File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1050,7 +1050,7 @@ func TestIncludesMultiLevel(t *testing.T) {
10501050}
10511051
10521052func TestIncludesRemote (t * testing.T ) {
1053- overrideExperimentValue (t , & experiments .RemoteTaskfiles , true , "1" )
1053+ enableExperimentForTest (t , & experiments .RemoteTaskfiles , "1" )
10541054
10551055 dir := "testdata/includes_remote"
10561056
@@ -2657,16 +2657,16 @@ func TestReference(t *testing.T) {
26572657 }
26582658}
26592659
2660- // overrideExperimentValue allows one to change the value of an experiment value for a set of tests,
2661- // with the value being restored to its previous state when tests complete.
2660+ // enableExperimentForTest enables the experiment behind pointer e for the duration of test t and sub- tests,
2661+ // with the experiment being restored to its previous state when tests complete.
26622662//
26632663// Typically experiments are controlled via TASK_X_ env vars, but we cannot use those in tests
26642664// because the experiment settings are parsed during experiments.init(), before any tests run.
2665- func overrideExperimentValue (t * testing.T , e * experiments.Experiment , enabled bool , val string ) {
2665+ func enableExperimentForTest (t * testing.T , e * experiments.Experiment , val string ) {
26662666 prev := * e
26672667 * e = experiments.Experiment {
26682668 Name : prev .Name ,
2669- Enabled : enabled ,
2669+ Enabled : true ,
26702670 Value : val ,
26712671 }
26722672 t .Cleanup (func () { * e = prev })
You can’t perform that action at this time.
0 commit comments