diff --git a/client/allocrunner/taskrunner/template/template_test.go b/client/allocrunner/taskrunner/template/template_test.go index 4a563a850ba..6de31ef5760 100644 --- a/client/allocrunner/taskrunner/template/template_test.go +++ b/client/allocrunner/taskrunner/template/template_test.go @@ -1038,7 +1038,7 @@ func TestTaskTemplateManager_FiltersEnvVars(t *testing.T) { defer os.Setenv("NOMAD_TASK_NAME", os.Getenv("NOMAD_TASK_NAME")) os.Setenv("NOMAD_TASK_NAME", "should be overridden by task") - testenv := "TESTENV_" + strings.ReplaceAll(uuid.Generate(), "-", "") + testenv := "TESTENV_" + strings.Replace(uuid.Generate(), "-", "", -1) os.Setenv(testenv, "MY_TEST_VALUE") defer os.Unsetenv(testenv)