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

RAM: Fix acceptance test failures #33002

Merged
merged 5 commits into from
Aug 14, 2023
Merged

Conversation

ewbankkit
Copy link
Contributor

Description

In CI:

=== RUN   TestAccRAMResourceShareAccepter_basic
=== PAUSE TestAccRAMResourceShareAccepter_basic
=== CONT  TestAccRAMResourceShareAccepter_basic
    resource_share_accepter_test.go:30: Step 1/2 error: Error running apply: exit status 1
        Error: No RAM Resource Share (arn:aws:ram:us-west-2:067819342479:resource-share/0623b688-527d-4869-9577-ebd7d14ddf29) invitation found
        NOTE: If both AWS accounts are in the same AWS Organization and RAM Sharing with AWS Organizations is enabled, this resource is not necessary
          with aws_ram_resource_share_accepter.test,
          on terraform_plugin_test.tf line 8, in resource "aws_ram_resource_share_accepter" "test":
           8: resource "aws_ram_resource_share_accepter" "test" {
--- FAIL: TestAccRAMResourceShareAccepter_basic (330.92s)

Output from Acceptance Testing

% make testacc TESTARGS='-run=TestAccRAMResourceShare_' PKG=ram ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ram/... -v -count 1 -parallel 2  -run=TestAccRAMResourceShare_ -timeout 180m
=== RUN   TestAccRAMResourceShare_basic
=== PAUSE TestAccRAMResourceShare_basic
=== RUN   TestAccRAMResourceShare_permission
=== PAUSE TestAccRAMResourceShare_permission
=== RUN   TestAccRAMResourceShare_allowExternalPrincipals
=== PAUSE TestAccRAMResourceShare_allowExternalPrincipals
=== RUN   TestAccRAMResourceShare_name
=== PAUSE TestAccRAMResourceShare_name
=== RUN   TestAccRAMResourceShare_tags
=== PAUSE TestAccRAMResourceShare_tags
=== RUN   TestAccRAMResourceShare_disappears
=== PAUSE TestAccRAMResourceShare_disappears
=== CONT  TestAccRAMResourceShare_basic
=== CONT  TestAccRAMResourceShare_name
--- PASS: TestAccRAMResourceShare_basic (30.11s)
=== CONT  TestAccRAMResourceShare_allowExternalPrincipals
--- PASS: TestAccRAMResourceShare_name (51.37s)
=== CONT  TestAccRAMResourceShare_permission
--- PASS: TestAccRAMResourceShare_permission (28.48s)
=== CONT  TestAccRAMResourceShare_disappears
--- PASS: TestAccRAMResourceShare_allowExternalPrincipals (50.81s)
=== CONT  TestAccRAMResourceShare_tags
--- PASS: TestAccRAMResourceShare_disappears (22.63s)
--- PASS: TestAccRAMResourceShare_tags (63.67s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ram	149.404s
% make testacc TESTARGS='-run=TestAccRAMResourceShareAccepter_' PKG=ram ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ram/... -v -count 1 -parallel 2  -run=TestAccRAMResourceShareAccepter_ -timeout 180m
=== RUN   TestAccRAMResourceShareAccepter_basic
=== PAUSE TestAccRAMResourceShareAccepter_basic
=== RUN   TestAccRAMResourceShareAccepter_disappears
=== PAUSE TestAccRAMResourceShareAccepter_disappears
=== RUN   TestAccRAMResourceShareAccepter_resourceAssociation
=== PAUSE TestAccRAMResourceShareAccepter_resourceAssociation
=== CONT  TestAccRAMResourceShareAccepter_basic
=== CONT  TestAccRAMResourceShareAccepter_resourceAssociation
    acctest.go:1419: skipping test for aws/us-west-2: Error running apply: exit status 1
        
        Error: No RAM Resource Share (arn:aws:ram:us-west-2:123456789012:resource-share/8a8faef8-667e-4925-833b-e512dd1894ba) invitation found
        
        NOTE: If both AWS accounts are in the same AWS Organization and RAM Sharing with AWS Organizations is enabled, this resource is not necessary
        
          with aws_ram_resource_share_accepter.test,
          on terraform_plugin_test.tf line 8, in resource "aws_ram_resource_share_accepter" "test":
           8: resource "aws_ram_resource_share_accepter" "test" {
        
=== NAME  TestAccRAMResourceShareAccepter_basic
    acctest.go:1419: skipping test for aws/us-west-2: Error running apply: exit status 1
        
        Error: No RAM Resource Share (arn:aws:ram:us-west-2:123456789012:resource-share/9543c6c9-5323-44d9-80a3-943abc230528) invitation found
        
        NOTE: If both AWS accounts are in the same AWS Organization and RAM Sharing with AWS Organizations is enabled, this resource is not necessary
        
          with aws_ram_resource_share_accepter.test,
          on terraform_plugin_test.tf line 8, in resource "aws_ram_resource_share_accepter" "test":
           8: resource "aws_ram_resource_share_accepter" "test" {
        
--- SKIP: TestAccRAMResourceShareAccepter_basic (142.83s)
=== CONT  TestAccRAMResourceShareAccepter_disappears
--- SKIP: TestAccRAMResourceShareAccepter_resourceAssociation (146.49s)
=== NAME  TestAccRAMResourceShareAccepter_disappears
    acctest.go:1419: skipping test for aws/us-west-2: Error running apply: exit status 1
        
        Error: No RAM Resource Share (arn:aws:ram:us-west-2:123456789012:resource-share/80b8309b-8d8b-4740-a7fd-4470a92abfd8) invitation found
        
        NOTE: If both AWS accounts are in the same AWS Organization and RAM Sharing with AWS Organizations is enabled, this resource is not necessary
        
          with aws_ram_resource_share_accepter.test,
          on terraform_plugin_test.tf line 8, in resource "aws_ram_resource_share_accepter" "test":
           8: resource "aws_ram_resource_share_accepter" "test" {
        
--- SKIP: TestAccRAMResourceShareAccepter_disappears (139.14s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ram	286.846s

…in the same AWS Organization and RAM Sharing with AWS Organizations is enabled, this resource is not necessary'.
Acceptance test output:

% make testacc TESTARGS='-run=TestAccRAMResourceShare_' PKG=ram ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ram/... -v -count 1 -parallel 2  -run=TestAccRAMResourceShare_ -timeout 180m
=== RUN   TestAccRAMResourceShare_basic
=== PAUSE TestAccRAMResourceShare_basic
=== RUN   TestAccRAMResourceShare_permission
=== PAUSE TestAccRAMResourceShare_permission
=== RUN   TestAccRAMResourceShare_allowExternalPrincipals
=== PAUSE TestAccRAMResourceShare_allowExternalPrincipals
=== RUN   TestAccRAMResourceShare_name
=== PAUSE TestAccRAMResourceShare_name
=== RUN   TestAccRAMResourceShare_tags
=== PAUSE TestAccRAMResourceShare_tags
=== RUN   TestAccRAMResourceShare_disappears
=== PAUSE TestAccRAMResourceShare_disappears
=== CONT  TestAccRAMResourceShare_basic
=== CONT  TestAccRAMResourceShare_name
--- PASS: TestAccRAMResourceShare_basic (30.11s)
=== CONT  TestAccRAMResourceShare_allowExternalPrincipals
--- PASS: TestAccRAMResourceShare_name (51.37s)
=== CONT  TestAccRAMResourceShare_permission
--- PASS: TestAccRAMResourceShare_permission (28.48s)
=== CONT  TestAccRAMResourceShare_disappears
--- PASS: TestAccRAMResourceShare_allowExternalPrincipals (50.81s)
=== CONT  TestAccRAMResourceShare_tags
--- PASS: TestAccRAMResourceShare_disappears (22.63s)
--- PASS: TestAccRAMResourceShare_tags (63.67s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ram	149.404s
@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added size/XL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/ram Issues and PRs that pertain to the ram service. labels Aug 14, 2023
@terraform-aws-provider terraform-aws-provider bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Aug 14, 2023
Copy link
Member

@jar-b jar-b left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

$ make testacc TESTARGS='-run=TestAccRAMResourceShare_' PKG=ram ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ram/... -v -count 1 -parallel 2  -run=TestAccRAMResourceShare_ -timeout 180m

--- PASS: TestAccRAMResourceShare_basic (23.10s)
=== CONT  TestAccRAMResourceShare_disappears
--- PASS: TestAccRAMResourceShare_name (36.97s)
=== CONT  TestAccRAMResourceShare_allowExternalPrincipals
--- PASS: TestAccRAMResourceShare_disappears (15.06s)
=== CONT  TestAccRAMResourceShare_tags
--- PASS: TestAccRAMResourceShare_allowExternalPrincipals (34.85s)
=== CONT  TestAccRAMResourceShare_permission
--- PASS: TestAccRAMResourceShare_tags (47.76s)
--- PASS: TestAccRAMResourceShare_permission (20.58s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ram        95.828s
$ make testacc TESTARGS='-run=TestAccRAMResourceShareAccepter_' PKG=ram ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ram/... -v -count 1 -parallel 2  -run=TestAccRAMResourceShareAccepter_ -timeout 180m

=== NAME  TestAccRAMResourceShareAccepter_basic
    acctest.go:1419: skipping test for aws/us-west-2: Error running apply: exit status 1

        Error: No RAM Resource Share (arn:aws:ram:us-west-2:187416307283:resource-share/1c384df8-4571-4e28-a490-f330c26354dd) invitation found

        NOTE: If both AWS accounts are in the same AWS Organization and RAM Sharing with AWS Organizations is enabled, this resource is not necessary

          with aws_ram_resource_share_accepter.test,
          on terraform_plugin_test.tf line 8, in resource "aws_ram_resource_share_accepter" "test":
           8: resource "aws_ram_resource_share_accepter" "test" {

=== NAME  TestAccRAMResourceShareAccepter_resourceAssociation
    acctest.go:1419: skipping test for aws/us-west-2: Error running apply: exit status 1

        Error: No RAM Resource Share (arn:aws:ram:us-west-2:187416307283:resource-share/efe236c5-364d-41a4-a2c4-456de0c1fb2c) invitation found

        NOTE: If both AWS accounts are in the same AWS Organization and RAM Sharing with AWS Organizations is enabled, this resource is not necessary

          with aws_ram_resource_share_accepter.test,
          on terraform_plugin_test.tf line 8, in resource "aws_ram_resource_share_accepter" "test":
           8: resource "aws_ram_resource_share_accepter" "test" {

--- SKIP: TestAccRAMResourceShareAccepter_basic (139.38s)
=== CONT  TestAccRAMResourceShareAccepter_disappears
--- SKIP: TestAccRAMResourceShareAccepter_resourceAssociation (141.27s)
=== NAME  TestAccRAMResourceShareAccepter_disappears
    acctest.go:1419: skipping test for aws/us-west-2: Error running apply: exit status 1

        Error: No RAM Resource Share (arn:aws:ram:us-west-2:187416307283:resource-share/09c2ca8e-a82a-4d04-84e1-8cc7d6034375) invitation found

        NOTE: If both AWS accounts are in the same AWS Organization and RAM Sharing with AWS Organizations is enabled, this resource is not necessary

          with aws_ram_resource_share_accepter.test,
          on terraform_plugin_test.tf line 8, in resource "aws_ram_resource_share_accepter" "test":
           8: resource "aws_ram_resource_share_accepter" "test" {

--- SKIP: TestAccRAMResourceShareAccepter_disappears (139.90s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ram        282.221s

@ewbankkit
Copy link
Contributor Author

After using aws_ram_sharing_with_organization (#25433) to disable sharing with the organization:

% make testacc TESTARGS='-run=TestAccRAMResourceShareAccepter_' PKG=ram ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ram/... -v -count 1 -parallel 2  -run=TestAccRAMResourceShareAccepter_ -timeout 180m
=== RUN   TestAccRAMResourceShareAccepter_basic
=== PAUSE TestAccRAMResourceShareAccepter_basic
=== RUN   TestAccRAMResourceShareAccepter_disappears
=== PAUSE TestAccRAMResourceShareAccepter_disappears
=== RUN   TestAccRAMResourceShareAccepter_resourceAssociation
=== PAUSE TestAccRAMResourceShareAccepter_resourceAssociation
=== CONT  TestAccRAMResourceShareAccepter_basic
=== CONT  TestAccRAMResourceShareAccepter_resourceAssociation
--- PASS: TestAccRAMResourceShareAccepter_basic (48.17s)
=== CONT  TestAccRAMResourceShareAccepter_disappears
--- PASS: TestAccRAMResourceShareAccepter_resourceAssociation (61.17s)
--- PASS: TestAccRAMResourceShareAccepter_disappears (158.26s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ram	211.679s

@ewbankkit ewbankkit merged commit 4c9c01c into main Aug 14, 2023
33 checks passed
@ewbankkit ewbankkit deleted the t-RAM-acceptance-test-failures branch August 14, 2023 21:47
@github-actions github-actions bot added this to the v5.13.0 milestone Aug 14, 2023
github-actions bot pushed a commit that referenced this pull request Aug 14, 2023
@github-actions
Copy link

This functionality has been released in v5.13.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!

@github-actions
Copy link

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.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. service/ram Issues and PRs that pertain to the ram service. size/XL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants