Thanks to visit codestin.com
Credit goes to github.com

Skip to content

test(cli): speed up stackdriver logging tests by setting GCE env #16298

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

Merged

Conversation

mafredri
Copy link
Member

This PR sets a "magic" environment variable to speed up Goolge stackdriver tests. I'm not 100% sure of the repercussions of this but I dont't think this is the right place to test that we're properly talking to GCP (and I'm not even sure if the test did confirm that). Since we're using slog, we should trust that those APIs work.

Before:

coder@w ~/coder main* ⇣go test ./cli -count=1 -short -run='TestServer'
ok  	github.com/coder/coder/v2/cli	38.687s

After:

coder@w ~/coder mafredri/test-cli-fix-test-server-logging-stackdriver*go test ./cli -count=1 -short -run='TestServer'
ok  	github.com/coder/coder/v2/cli	1.604s

@mafredri mafredri requested a review from dannykopping January 27, 2025 12:45
@mafredri mafredri requested a review from coadler January 27, 2025 12:45
@mafredri mafredri changed the title test(cli): speed stackdriver logging tests by setting GCE_METADATA_HOST test(cli): speed up stackdriver logging tests by setting GCE env Jan 27, 2025
@mafredri mafredri force-pushed the mafredri/test-cli-fix-test-server-logging-stackdriver branch 3 times, most recently from 47ea6dd to 26dc2b2 Compare January 27, 2025 13:03
@mafredri mafredri force-pushed the mafredri/test-cli-fix-test-server-logging-stackdriver branch from 26dc2b2 to a0f9fa0 Compare January 27, 2025 13:06
Copy link
Contributor

@dannykopping dannykopping left a comment

Choose a reason for hiding this comment

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

Seems reasonable 👍

@mafredri mafredri merged commit b44ae40 into main Jan 28, 2025
32 checks passed
@mafredri mafredri deleted the mafredri/test-cli-fix-test-server-logging-stackdriver branch January 28, 2025 11:38
@github-actions github-actions bot locked and limited conversation to collaborators Jan 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants