Skip to content

Commit

Permalink
test/custom_ssl: Rotate certificate
Browse files Browse the repository at this point in the history
Updates the certificates used for custom SSL to prevent exceptions with
the expiry.

```
=== RUN   TestAccCloudflareCustomSSL_Basic
=== PAUSE TestAccCloudflareCustomSSL_Basic
=== CONT  TestAccCloudflareCustomSSL_Basic
--- FAIL: TestAccCloudflareCustomSSL_Basic (0.28s)
    testing.go:569: Step 0 error: errors during apply:

        Error: Failed to create custom ssl cert: error from makeRequest: HTTP status 400: content "{\"success\":false,\"errors\":[{\"code\":1206,\"message\":\"The certificate will expire within soon. Please supply a newer one\"}],\"messages\":[],\"result\":null}"

          on /opt/teamcity-agent/temp/buildTmp/tf-test656714404/main.tf line 2:
          (source code not available)

FAIL
```
  • Loading branch information
jacobbednarz committed Oct 21, 2019
1 parent cb790c4 commit 3a8bec9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cloudflare/resource_cloudflare_custom_ssl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ func testAccCheckCloudflareCustomSSLCertBasic(zoneID string, rName string) strin
resource "cloudflare_custom_ssl" "%[2]s" {
zone_id = "%[1]s"
custom_ssl_options = {
certificate = "-----BEGIN CERTIFICATE-----\nMIIFXjCCBEagAwIBAgISAympguRfAsX307ZikP7jl0dwMA0GCSqGSIb3DQEBCwUA\nMEoxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MSMwIQYDVQQD\nExpMZXQncyBFbmNyeXB0IEF1dGhvcml0eSBYMzAeFw0xOTA4MDUxNDU4NTlaFw0x\nOTExMDMxNDU4NTlaMB4xHDAaBgNVBAMTE3RlcnJhZm9ybS5jZmFwaS5uZXQwggEi\nMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDMmJ7n1plIwwuA45Q6GeAb13A6\n4/1rOUIHYp+wG/IRyUQijpoSldeYd9pzJOudB200tmNnmMmYIIT7xyewWcEw2LHP\nyEJ2vIuZnl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E/52o\noT7C3QKBgQCrrgFxEEH4PmFJ3NXnkO1Yyz2WX95JIO5jkcRpKt0XDHjQ760IboHK\nGUSzOjMSR+7000qkvGZwIS0Z9R6yzsEiwn8ZBYC2GvR2dMmWzKH7qom48pOvLFKt\naC0/ce9OcODi4BFalUuM8MPkl9TdAzlTubHB8DmnQh3GscfJUQahPQ==\n-----END RSA PRIVATE KEY-----\n"
bundle_method = "ubiquitous",
geo_restrictions = "us"
type = "legacy_custom"
Expand Down

0 comments on commit 3a8bec9

Please sign in to comment.