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

r/ecr_repository_policy - Read after update + validate policy + disappears test #14193

Merged
merged 7 commits into from
Mar 25, 2021

Conversation

DrFaust92
Copy link
Collaborator

@DrFaust92 DrFaust92 commented Jul 15, 2020

Community Note

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

Relates #13826
Closes #3924
Closes #545

Release note for CHANGELOG:

resource_ecr_repository_policy: add plan time validation for `policy`

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSEcrRepositoryPolicy_'
--- PASS: TestAccAWSEcrRepositoryPolicy_basic (63.26s)
--- PASS: TestAccAWSEcrRepositoryPolicy_iam (54.24s)
--- PASS: TestAccAWSEcrRepositoryPolicy_disappears (33.63s)
--- PASS: TestAccAWSEcrRepositoryPolicy_disappears_repository (28.06s)

@DrFaust92 DrFaust92 requested a review from a team July 15, 2020 19:45
@ghost ghost added size/L Managed by automation to categorize the size of a PR. service/ecr Issues and PRs that pertain to the ecr service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Jul 15, 2020
@DrFaust92 DrFaust92 added the bug Addresses a defect in current functionality. label Aug 27, 2020
@DrFaust92 DrFaust92 changed the title r/ecr_repository_policy - add plan time validation to policy + disappears test r/ecr_repository_policy - Read after update + add plan time validation to policy + disappears test Aug 28, 2020
@DrFaust92 DrFaust92 changed the title r/ecr_repository_policy - Read after update + add plan time validation to policy + disappears test r/ecr_repository_policy - Read after update + validate policy + disappears test Aug 28, 2020
@DrFaust92
Copy link
Collaborator Author

rebased

--- PASS: TestAccAWSEcrRepositoryPolicy_disappears_repository (33.65s)
--- PASS: TestAccAWSEcrRepositoryPolicy_disappears (40.01s)
--- PASS: TestAccAWSEcrRepositoryPolicy_iam (52.15s)
--- PASS: TestAccAWSEcrRepositoryPolicy_basic (76.40s)

Base automatically changed from master to main January 23, 2021 00:58
DrFaust92 and others added 7 commits March 11, 2021 01:35
use enums

read after update
add disappears tests + make tests more specific
Co-authored-by: Carl Henrik Lunde <chlunde@gmail.com>
Co-authored-by: Carl Henrik Lunde <chlunde@gmail.com>
Co-authored-by: Carl Henrik Lunde <chlunde@gmail.com>
Copy link
Contributor

@gdavison gdavison left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

--- PASS: TestAccAWSEcrRepositoryPolicy_disappears_repository (12.88s)
--- PASS: TestAccAWSEcrRepositoryPolicy_disappears (14.31s)
--- PASS: TestAccAWSEcrRepositoryPolicy_basic (25.93s)
--- PASS: TestAccAWSEcrRepositoryPolicy_iam (33.38s)

Comment on lines -52 to +53
log.Printf("[DEBUG] Creating ECR resository policy: %s", input)
log.Printf("[DEBUG] Creating ECR repository policy: %#v", input)
Copy link
Contributor

Choose a reason for hiding this comment

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

The format verb %s is better to use in this case, since AWS SDK structures define String() functions

@gdavison gdavison merged commit 70900dd into hashicorp:main Mar 25, 2021
@github-actions github-actions bot added this to the v3.34.0 milestone Mar 25, 2021
@ghost
Copy link

ghost commented Mar 26, 2021

This has been released in version 3.34.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 for triage. Thanks!

@DrFaust92 DrFaust92 deleted the r/ecr_repo_policy branch April 15, 2021 10:43
@ghost
Copy link

ghost commented Apr 25, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Apr 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/ecr Issues and PRs that pertain to the ecr service. size/L 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
3 participants