- Notifications
You must be signed in to change notification settings - Fork926
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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!") |
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.
It'd be cool if we could actually check if parallel has been set (or will be set!), maybe we should implement out owntesting.TB
... 😆
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.
We could possibly set a dummy environment variable; this should causet.Parallel()
to panic.
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.
Nice 👍
99e103e
intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
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 ift.Parallel()
had already been called.