@@ -268,8 +268,10 @@ func NewOptions(t testing.TB, options *Options) (func(http.Handler), context.Can
268
268
if options .DeploymentValues == nil {
269
269
options .DeploymentValues = DeploymentValues (t )
270
270
}
271
- // This value is not safe to run in parallel. Force it to be false.
272
- options .DeploymentValues .DisableOwnerWorkspaceExec = false
271
+ // This value is not safe to run in parallel.
272
+ if options .DeploymentValues .DisableOwnerWorkspaceExec {
273
+ t .Logf ("WARNING: DisableOwnerWorkspaceExec is set, this is not safe in parallel tests!" )
274
+ }
273
275
274
276
// If no ratelimits are set, disable all rate limiting for tests.
275
277
if options .APIRateLimit == 0 {
@@ -1385,10 +1387,13 @@ func SDKError(t testing.TB, err error) *codersdk.Error {
1385
1387
return cerr
1386
1388
}
1387
1389
1388
- func DeploymentValues (t testing.TB )* codersdk.DeploymentValues {
1389
- var cfg codersdk.DeploymentValues
1390
+ func DeploymentValues (t testing.TB , mut ... func ( * codersdk. DeploymentValues ) )* codersdk.DeploymentValues {
1391
+ cfg := & codersdk.DeploymentValues {}
1390
1392
opts := cfg .Options ()
1391
1393
err := opts .SetDefaults ()
1392
1394
require .NoError (t ,err )
1393
- return & cfg
1395
+ for _ ,fn := range mut {
1396
+ fn (cfg )
1397
+ }
1398
+ return cfg
1394
1399
}