Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
clearing ExperimentsAll
  • Loading branch information
Kira-Pilot committed Oct 16, 2023
commit f13b815d178ebb169e0123ac101ae3354af04515
4 changes: 4 additions & 0 deletions coderd/experiments_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ func Test_Experiments(t *testing.T) {
t.Parallel()
cfg := coderdtest.DeploymentValues(t)
cfg.Experiments = []string{"foo", "BAR"}
inMemoryExperimentsAll := codersdk.ExperimentsAll
codersdk.ExperimentsAll = []codersdk.Experiment{"bat", "fizz", "foo", "BAR"}
client := coderdtest.New(t, &coderdtest.Options{
DeploymentValues: cfg,
Expand All @@ -137,5 +138,8 @@ func Test_Experiments(t *testing.T) {

require.True(t, codersdk.Experiments{"foo", "BAR"}.Enabled("foo"))
require.True(t, codersdk.Experiments{"foo", "BAR"}.Enabled("BAR"))

// reset all experiments so other tests don't flake
codersdk.ExperimentsAll = inMemoryExperimentsAll
})
}