-
Notifications
You must be signed in to change notification settings - Fork 6
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
Added acceptance testcases #74
base: main
Are you sure you want to change the base?
Conversation
…pre-existing project
|
GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
---|---|---|---|---|---|
- | - | Generic High Entropy Secret | e1bb80c | examples/resources/infisical_secret/resource.tf | View secret |
- | - | Generic High Entropy Secret | b109a92 | examples/resources/infisical_secret/resource.tf | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
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.
After tweaking things slightly locally, I was able to get the tests to run, and it works smoothly after that! Good work, I left a few comments for you.
We should defiantly make this a requirement for all future PR's, that the PR's also include covering tests.
@@ -0,0 +1,99 @@ | |||
package testAcc |
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 entire test file is commented out, is this intentional?
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.
Yes for both environment and imports.
Both are the moment incompatiable to test with terraform. Need modification for both
.github/workflows/test.yml
Outdated
INFISICAL_UNIVERSAL_AUTH_CLIENT_ID: ${{ secrets.INFISICAL_UNIVERSAL_AUTH_CLIENT_ID }} | ||
INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET: ${{ secrets.INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET }} | ||
INFISICAL_TEST_ORG_ID: ${{ secrets.INFISICAL_TEST_ORG_ID }} | ||
run: go test ./... -v $(TESTARGS) -timeout 120m |
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.
All acceptance tests are failing due to TESTARGS
command not found
INFISICAL_HOST: ${{ secrets.INFISICAL_HOST }} | ||
INFISICAL_UNIVERSAL_AUTH_CLIENT_ID: ${{ secrets.INFISICAL_UNIVERSAL_AUTH_CLIENT_ID }} | ||
INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET: ${{ secrets.INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET }} | ||
INFISICAL_TEST_ORG_ID: ${{ secrets.INFISICAL_TEST_ORG_ID }} |
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.
Testing locally:
Makefile:
testacc:
TF_ACC=1 go test ./... -v $(TESTARGS) -timeout 120m
./...
results in no tests being run. If I replace ./...
with ./internal/testacc
, it works. Are you sure ./...
works?
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.
Hmm let me check it out. The makefile has the same command.
This PR adds acceptance test to ensure terraform stability. This includes most of the important resources like secret, secret folders, identity, identity auth, project identity, permission etc.
More will be coming soon