test: avoid sharing deployment values between subtests (#19833)

Blink didn't figure out a CI failure on main was caused by a data race; fixing it.


I've also updated the [blink prompt](https://gist.githubusercontent.com/ethanndickson/8dea9f1db3957ac1baf30ae8ce6f1a42/raw/060aea7fabb82bef0029a17dad9a5daee7940760/blink-flake-instructions.md).

https://github.com/coder/coder/actions/runs/17737809615
This commit is contained in:
Ethan
2025-09-16 13:51:26 +10:00
committed by GitHub
parent cda859363e
commit 995b330250
4 changed files with 48 additions and 40 deletions
+6 -5
View File
@@ -4106,16 +4106,15 @@ func TestUpdateWorkspaceACL(t *testing.T) {
func TestDeleteWorkspaceACL(t *testing.T) {
t.Parallel()
dv := coderdtest.DeploymentValues(t)
dv.Experiments = []string{string(codersdk.ExperimentWorkspaceSharing)}
t.Run("WorkspaceOwnerCanDelete_Groups", func(t *testing.T) {
t.Parallel()
var (
client, db, admin = coderdenttest.NewWithDatabase(t, &coderdenttest.Options{
Options: &coderdtest.Options{
DeploymentValues: dv,
DeploymentValues: coderdtest.DeploymentValues(t, func(dv *codersdk.DeploymentValues) {
dv.Experiments = []string{string(codersdk.ExperimentWorkspaceSharing)}
}),
},
LicenseOptions: &coderdenttest.LicenseOptions{
Features: license.Features{
@@ -4157,7 +4156,9 @@ func TestDeleteWorkspaceACL(t *testing.T) {
var (
client, db, admin = coderdenttest.NewWithDatabase(t, &coderdenttest.Options{
Options: &coderdtest.Options{
DeploymentValues: dv,
DeploymentValues: coderdtest.DeploymentValues(t, func(dv *codersdk.DeploymentValues) {
dv.Experiments = []string{string(codersdk.ExperimentWorkspaceSharing)}
}),
},
LicenseOptions: &coderdenttest.LicenseOptions{
Features: license.Features{