Skip to content

Commit

Permalink
certificate_packs: add Status field
Browse files Browse the repository at this point in the history
This field is essential for automating tasks related to certificate
packs. For instance, upon creating a certificate pack, the validation
process must be repeatedly initiated until the status transitions to
active.
  • Loading branch information
cofyc committed Apr 21, 2023
1 parent 031061a commit f72d69a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions .changelog/1271.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
certificate_packs: add Status field to indicate the status of certificate pack
1 change: 1 addition & 0 deletions certificate_packs.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ type CertificatePack struct {
Hosts []string `json:"hosts"`
Certificates []CertificatePackCertificate `json:"certificates"`
PrimaryCertificate string `json:"primary_certificate"`
Status string `json:"status"`
ValidationRecords []SSLValidationRecord `json:"validation_records,omitempty"`
ValidationErrors []SSLValidationError `json:"validation_errors,omitempty"`
ValidationMethod string `json:"validation_method"`
Expand Down
2 changes: 2 additions & 0 deletions certificate_packs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ var (
ID: "3822ff90-ea29-44df-9e55-21300bb9419b",
Type: "advanced",
Hosts: []string{"example.com", "*.example.com", "www.example.com"},
Status: "initializing",
ValidationMethod: "txt",
ValidityDays: 90,
CertificateAuthority: "lets_encrypt",
Expand Down Expand Up @@ -244,6 +245,7 @@ func TestRestartAdvancedCertificateValidation(t *testing.T) {
ID: "3822ff90-ea29-44df-9e55-21300bb9419b",
Type: "advanced",
Hosts: []string{"example.com", "*.example.com", "www.example.com"},
Status: "initializing",
ValidityDays: 365,
ValidationMethod: "txt",
CertificateAuthority: "lets_encrypt",
Expand Down

0 comments on commit f72d69a

Please sign in to comment.