-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
r/aws_devopsguru(test): add service level pre-check #36724
Conversation
Community NoteVoting for Prioritization
For Submitters
|
8ca6f15
to
b921fc6
Compare
This pre-check captures operation errors observed when calling DevOps Guru in certain non-commercial partitions, such as GovCloud. Before: ``` Error: creating Amazon DevOps Guru Notification Channel: operation error DevOps Guru: AddNotificationChannel, https response error StatusCode: 0, RequestID: , request send failed, Put "https://devops-guru.us-gov-east-1.amazonaws.com/channels": dial tcp: lookup devops-guru.us-gov-east-1.amazonaws.com: no such host ``` GovCloud: ```console % make testacc PKG=devopsguru TESTS=TestAccDevOpsGuru_serial ==> Checking that code complies with gofmt requirements... TF_ACC=1 go1.21.8 test ./internal/service/devopsguru/... -v -count 1 -parallel 20 -run='TestAccDevOpsGuru_serial' -timeout 360m === RUN TestAccDevOpsGuru_serial === PAUSE TestAccDevOpsGuru_serial === CONT TestAccDevOpsGuru_serial devopsguru_test.go:72: skipping acceptance testing: operation error DevOps Guru: DescribeAccountHealth, https response error StatusCode: 0, RequestID: , request send failed, Get "https://devops-guru.us-gov-east-1.amazonaws.com/accounts/health": dial tcp: lookup devops-guru.us-gov-east-1.amazonaws.com: no such host --- SKIP: TestAccDevOpsGuru_serial (0.17s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/devopsguru 5.651s ``` Commercial: ```console % make testacc PKG=devopsguru TESTS=TestAccDevOpsGuru_serial ==> Checking that code complies with gofmt requirements... TF_ACC=1 go1.21.8 test ./internal/service/devopsguru/... -v -count 1 -parallel 20 -run='TestAccDevOpsGuru_serial' -timeout 360m --- PASS: TestAccDevOpsGuru_serial (222.18s) --- PASS: TestAccDevOpsGuru_serial/ServiceIntegration (38.19s) --- PASS: TestAccDevOpsGuru_serial/ServiceIntegration/basic (18.19s) --- PASS: TestAccDevOpsGuru_serial/ServiceIntegration/kms (20.00s) --- PASS: TestAccDevOpsGuru_serial/EventSourcesConfig (20.63s) --- PASS: TestAccDevOpsGuru_serial/EventSourcesConfig/basic (11.15s) --- PASS: TestAccDevOpsGuru_serial/EventSourcesConfig/disappears (9.48s) --- PASS: TestAccDevOpsGuru_serial/NotificationChannel (38.04s) --- PASS: TestAccDevOpsGuru_serial/NotificationChannel/basic (13.16s) --- PASS: TestAccDevOpsGuru_serial/NotificationChannel/disappears (11.58s) --- PASS: TestAccDevOpsGuru_serial/NotificationChannel/filters (13.29s) --- PASS: TestAccDevOpsGuru_serial/NotificationChannelDataSource (11.37s) --- PASS: TestAccDevOpsGuru_serial/NotificationChannelDataSource/basic (11.37s) --- PASS: TestAccDevOpsGuru_serial/ResourceCollection (103.72s) --- PASS: TestAccDevOpsGuru_serial/ResourceCollection/disappears (9.60s) --- PASS: TestAccDevOpsGuru_serial/ResourceCollection/tags (11.27s) --- PASS: TestAccDevOpsGuru_serial/ResourceCollection/tagsAllResources (11.38s) --- PASS: TestAccDevOpsGuru_serial/ResourceCollection/basic (11.37s) --- PASS: TestAccDevOpsGuru_serial/ResourceCollection/cloudformation (60.10s) --- PASS: TestAccDevOpsGuru_serial/ResourceCollectionDataSource (9.42s) --- PASS: TestAccDevOpsGuru_serial/ResourceCollectionDataSource/basic (9.42s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/devopsguru 227.638s ```
b921fc6
to
d1ce462
Compare
Thank you for your contribution! 🚀 A new usage of AWS SDK for Go V1 was detected. Please prefer AWS SDK for Go V2 for all net-new services. If this is an enhancement or bug fix to an existing AWS SDK Go V1 based resource, this comment can be safely ignored. For additional information refer to the AWS SDK for Go Versions page in the contributor guide. |
Adds the logic used in internal/sweep/awsv2 to the internal/acctest pre-check skipping function. Successfully tested with DevOpsGuru in GovCloud: ```console % make testacc PKG=devopsguru TESTS=TestAccDevOpsGuru_serial ==> Checking that code complies with gofmt requirements... TF_ACC=1 go1.21.8 test ./internal/service/devopsguru/... -v -count 1 -parallel 20 -run='TestAccDevOpsGuru_serial' -timeout 360m --- PASS: TestAccDevOpsGuru_serial (0.12s) --- PASS: TestAccDevOpsGuru_serial/ResourceCollection (0.11s) --- SKIP: TestAccDevOpsGuru_serial/ResourceCollection/basic (0.11s) --- SKIP: TestAccDevOpsGuru_serial/ResourceCollection/cloudformation (0.00s) --- SKIP: TestAccDevOpsGuru_serial/ResourceCollection/disappears (0.00s) --- SKIP: TestAccDevOpsGuru_serial/ResourceCollection/tags (0.00s) --- SKIP: TestAccDevOpsGuru_serial/ResourceCollection/tagsAllResources (0.00s) --- PASS: TestAccDevOpsGuru_serial/ResourceCollectionDataSource (0.00s) --- SKIP: TestAccDevOpsGuru_serial/ResourceCollectionDataSource/basic (0.00s) --- PASS: TestAccDevOpsGuru_serial/ServiceIntegration (0.00s) --- SKIP: TestAccDevOpsGuru_serial/ServiceIntegration/basic (0.00s) --- SKIP: TestAccDevOpsGuru_serial/ServiceIntegration/kms (0.00s) --- PASS: TestAccDevOpsGuru_serial/EventSourcesConfig (0.00s) --- SKIP: TestAccDevOpsGuru_serial/EventSourcesConfig/basic (0.00s) --- SKIP: TestAccDevOpsGuru_serial/EventSourcesConfig/disappears (0.00s) --- PASS: TestAccDevOpsGuru_serial/NotificationChannel (0.00s) --- SKIP: TestAccDevOpsGuru_serial/NotificationChannel/basic (0.00s) --- SKIP: TestAccDevOpsGuru_serial/NotificationChannel/disappears (0.00s) --- SKIP: TestAccDevOpsGuru_serial/NotificationChannel/filters (0.00s) --- PASS: TestAccDevOpsGuru_serial/NotificationChannelDataSource (0.00s) --- SKIP: TestAccDevOpsGuru_serial/NotificationChannelDataSource/basic (0.00s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/devopsguru 5.604s ```
GovCloud acceptance test results after switching the assertion to % make testacc PKG=devopsguru TESTS=TestAccDevOpsGuru_serial
==> Checking that code complies with gofmt requirements... TF_ACC=1 go1.21.8 test ./internal/service/devopsguru/... -v -count 1 -parallel 20 -run='TestAccDevOpsGuru_serial' -timeout 360m
--- PASS: TestAccDevOpsGuru_serial (0.12s)
--- PASS: TestAccDevOpsGuru_serial/ResourceCollection (0.11s)
--- SKIP: TestAccDevOpsGuru_serial/ResourceCollection/basic (0.11s)
--- SKIP: TestAccDevOpsGuru_serial/ResourceCollection/cloudformation (0.00s)
--- SKIP: TestAccDevOpsGuru_serial/ResourceCollection/disappears (0.00s)
--- SKIP: TestAccDevOpsGuru_serial/ResourceCollection/tags (0.00s)
--- SKIP: TestAccDevOpsGuru_serial/ResourceCollection/tagsAllResources (0.00s)
--- PASS: TestAccDevOpsGuru_serial/ResourceCollectionDataSource (0.00s)
--- SKIP: TestAccDevOpsGuru_serial/ResourceCollectionDataSource/basic (0.00s)
--- PASS: TestAccDevOpsGuru_serial/ServiceIntegration (0.00s)
--- SKIP: TestAccDevOpsGuru_serial/ServiceIntegration/basic (0.00s)
--- SKIP: TestAccDevOpsGuru_serial/ServiceIntegration/kms (0.00s)
--- PASS: TestAccDevOpsGuru_serial/EventSourcesConfig (0.00s)
--- SKIP: TestAccDevOpsGuru_serial/EventSourcesConfig/basic (0.00s)
--- SKIP: TestAccDevOpsGuru_serial/EventSourcesConfig/disappears (0.00s)
--- PASS: TestAccDevOpsGuru_serial/NotificationChannel (0.00s)
--- SKIP: TestAccDevOpsGuru_serial/NotificationChannel/basic (0.00s)
--- SKIP: TestAccDevOpsGuru_serial/NotificationChannel/disappears (0.00s)
--- SKIP: TestAccDevOpsGuru_serial/NotificationChannel/filters (0.00s)
--- PASS: TestAccDevOpsGuru_serial/NotificationChannelDataSource (0.00s)
--- SKIP: TestAccDevOpsGuru_serial/NotificationChannelDataSource/basic (0.00s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/devopsguru 5.604s |
This functionality has been released in v5.45.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Description
This pre-check captures operation errors observed when calling DevOps Guru in certain non-commercial partitions, such as GovCloud.
Before:
Error: creating Amazon DevOps Guru Notification Channel: operation error DevOps Guru: AddNotificationChannel, https response error StatusCode: 0, RequestID: , request send failed, Put "https://devops-guru.us-gov-east-1.amazonaws.com/channels": dial tcp: lookup devops-guru.us-gov-east-1.amazonaws.com: no such host
See acceptance testing below for after.
Relations
Relates #17919
Relates #36694 (review)
References
Output from Acceptance Testing
GovCloud:
Commercial: