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

Acceptance Id Tests #402

Merged
merged 2 commits into from
Dec 8, 2023
Merged

Acceptance Id Tests #402

merged 2 commits into from
Dec 8, 2023

Conversation

dehume
Copy link
Contributor

@dehume dehume commented Dec 8, 2023

Include tests for id in all acceptance tests. Because we do not know the system ids until they are generated, using TestMatchResourceAttr to ensure they match the expected regex for the 5 main id types:

var (
	terraformObjectIdRegex       = regexp.MustCompile("^aws/us-east-1:")
	terraformGrantIdRegex        = regexp.MustCompile("^aws/us-east-1:GRANT|")
	terraformGrantDefaultIdRegex = regexp.MustCompile("^aws/us-east-1:GRANT DEFAULT|")
	terraformGrantSystemIdRegex  = regexp.MustCompile("^aws/us-east-1:GRANT ROLE|")
	terraformGrantRoleIdRegex    = regexp.MustCompile("^aws/us-east-1:GRANT SYSTEM|")
)

@dehume dehume added the testing Issue related to tests label Dec 8, 2023
@dehume dehume requested a review from bobbyiliev as a code owner December 8, 2023 14:28
Copy link
Contributor

@bobbyiliev bobbyiliev left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you!

@dehume dehume merged commit 8c03c15 into main Dec 8, 2023
5 checks passed
@dehume dehume deleted the Acceptance-Id-Tests branch December 8, 2023 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Issue related to tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants