Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cdn: Add test sweeper and retry with backoff. #947

Merged
merged 5 commits into from
Feb 14, 2023
Merged

Conversation

andrewsomething
Copy link
Member

The CDN API seems to have additional rate limiting applied to it that is stricter than the rest of our API. I also experienced some lag in being able to GET a newly created CDN where it would return 404 for the first few attempts. So this adds a retry with backoff for GETing a CDN.

It also adds a test sweeper and fixes a test failure cause due to the type of certificate that was used.

$ make testacc PKG_NAME=digitalocean/cdn TESTARGS="-count=1"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test -v ./digitalocean/cdn/... -count=1 -timeout 120m -parallel=2
=== RUN   TestAccDigitalOceanCDN_Create
=== PAUSE TestAccDigitalOceanCDN_Create
=== RUN   TestAccDigitalOceanCDN_Create_with_TTL
=== PAUSE TestAccDigitalOceanCDN_Create_with_TTL
=== RUN   TestAccDigitalOceanCDN_Create_and_Update
=== PAUSE TestAccDigitalOceanCDN_Create_and_Update
=== RUN   TestAccDigitalOceanCDN_CustomDomain
=== PAUSE TestAccDigitalOceanCDN_CustomDomain
=== CONT  TestAccDigitalOceanCDN_Create
=== CONT  TestAccDigitalOceanCDN_Create_and_Update
--- PASS: TestAccDigitalOceanCDN_Create (70.86s)
=== CONT  TestAccDigitalOceanCDN_CustomDomain
--- PASS: TestAccDigitalOceanCDN_Create_and_Update (88.23s)
=== CONT  TestAccDigitalOceanCDN_Create_with_TTL
--- PASS: TestAccDigitalOceanCDN_Create_with_TTL (55.90s)
--- PASS: TestAccDigitalOceanCDN_CustomDomain (89.31s)
PASS
ok      github.com/digitalocean/terraform-provider-digitalocean/digitalocean/cdn        160.184s

@andrewsomething andrewsomething requested a review from a team February 13, 2023 16:05
@andrewsomething andrewsomething temporarily deployed to Acceptance Tests February 13, 2023 17:40 — with GitHub Actions Inactive
@andrewsomething andrewsomething temporarily deployed to Acceptance Tests February 13, 2023 17:48 — with GitHub Actions Inactive
Copy link
Member

@danaelhe danaelhe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@andrewsomething andrewsomething merged commit 49bd2b4 into main Feb 14, 2023
@andrewsomething andrewsomething deleted the asb/cdn-tests branch February 14, 2023 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants