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

Fix the fact that some GCP env vars are immune to WithDisallowEnvVars #250

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

sgmiller
Copy link
Collaborator

@sgmiller sgmiller commented Apr 8, 2024

No description provided.

@sgmiller sgmiller requested review from jefferai and a team as code owners April 8, 2024 21:12
@sgmiller sgmiller requested a review from a team April 8, 2024 21:12
@sgmiller sgmiller changed the title Fix the fact that some GCP env vars are immune to disallowEnvVars Fix the fact that some GCP env vars are immune to WithDisallowEnvVars Apr 8, 2024
Copy link
Contributor

@victorr victorr left a comment

Choose a reason for hiding this comment

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

👍

@@ -23,7 +23,6 @@ const (
// TestGcpKeyIdAfterConfig will test the result of calling the wrapper's KeyId()
// after it's configured with various options
func TestGcpKeyIdAfterConfig(t *testing.T) {
t.Parallel()
Copy link
Contributor

Choose a reason for hiding this comment

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

This was removed as it didn't play nice with the new test case disabling env-vars

}

func TestGcpCkmsSeal(t *testing.T) {
t.Setenv(EnvGcpCkmsWrapperProject, "") // Make sure at least one required value is not set.
Copy link
Contributor

Choose a reason for hiding this comment

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

This test worked correctly if it ran by itself but running them all together, if another test ran first and set the appropriate vars would fail as we wouldn't get the failure we expected.

@sgmiller sgmiller merged commit 24f9019 into main Apr 10, 2024
10 of 20 checks passed
@sgmiller sgmiller deleted the sgm/fix-gcp-env-vars branch April 10, 2024 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants