-
Notifications
You must be signed in to change notification settings - Fork 50
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
HCPIE-1244: Improve Identity-Specific Testing #810
HCPIE-1244: Improve Identity-Specific Testing #810
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
praise: great work on this! 🙌
@@ -0,0 +1,46 @@ | |||
name: Run Identity Tests on Identity Code Changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome! Can this be extended to all the domains? As in run secrets test when those are changed? I had created ticket for this https://hashicorp.atlassian.net/browse/HCPF-1722
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@manish-hashicorp
Yes! It can be extended manually for sure if each team wants to add their own step to this workflow. If we wanted a more autonomous solution, we might have to spend a bit more time on it.
Roughly speaking, we could do the following:
- Get a listing of all changed files in Git. Parse the list to only show the modified directories.
- Get a recursive listing of all directories within
./internal
- Loop through the lists and mark which directories to run tests for
- Loop again and actually run the tests with the changed files using
make testacc-ci TEST=DIRECTORY_NAME
This will be out of scope for this specific ticket since it will require some more testing, but with that being said, I'm happy to update the ticket you posted with my findings. That way, whoever picks it up will have a head start on how to complete the work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Please do add information in that ticket.
* main: New Resource: Waypoint Add-on (#807) Gracefully handle rate limiting error on `hcp_vault_secrets_secret` resource. (#812) HCPIE-1244: Improve Identity-Specific Testing (#810) Fix code ownership for vault secrets files (#814) [COMPLIANCE] Add Copyright and License Headers (#799) update tests to use real tf no-code modules (#811)
🛠️ Description
This PR aims to improve how identity-specific tests are run.
contributing.md
docs that explains how to run a specific package.I've added a comment line in one of the identity files to trigger the test workflow. This of course can't be merged to main so I've removed it now after confirming that the action did indeed run on a change. Reviewers can check the commit history to see the checks that passed when this comment was still present. Specifically this commit: https://github.com/hashicorp/terraform-provider-hcp/actions/runs/8649951887/job/23717371696?pr=810
Output from acceptance testing: