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

Skip to content

feat(coderd/coderdtest): allow mutating deployment values #14414

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
merged 1 commit into from
Aug 23, 2024

Conversation

johnstcn
Copy link
Member

@johnstcn johnstcn commented Aug 23, 2024

Allows mutating deployment values.
Also modifies the check on DisableOwnerWorkspaceExec to be a warn-log, as this caught me out for a while when testing something. Unfortunately I couldn't find a way to detect inside a test if t.Parallel() had already been called.

@johnstcn johnstcn self-assigned this Aug 23, 2024
options.DeploymentValues.DisableOwnerWorkspaceExec = false
// This value is not safe to run in parallel.
if options.DeploymentValues.DisableOwnerWorkspaceExec {
t.Logf("WARNING: DisableOwnerWorkspaceExec is set, this is not safe in parallel tests!")
Copy link
Member

Choose a reason for hiding this comment

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

It'd be cool if we could actually check if parallel has been set (or will be set!), maybe we should implement out own testing.TB... 😆

Copy link
Member Author

Choose a reason for hiding this comment

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

We could possibly set a dummy environment variable; this should cause t.Parallel() to panic.

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.

Nice 👍

@johnstcn johnstcn merged commit 99e103e into main Aug 23, 2024
31 checks passed
@johnstcn johnstcn deleted the cj/coderdtest/mutate-deployment-values branch August 23, 2024 11:15
@github-actions github-actions bot locked and limited conversation to collaborators Aug 23, 2024
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.

3 participants