testing: setting env var incompatible with parallel tests (#14405)

Neither the `os.Setenv` nor `t.Setenv` helper are safe to use in parallel tests
because environment variables are process-global. The stdlib panics if you try
to do this. Remove the `ci.Parallel()` call from all tests where we're setting
environment variables.
This commit is contained in:
Tim Gross
2022-08-30 14:49:03 -04:00
committed by GitHub
parent 36799570f6
commit 13bc6d6d8a
13 changed files with 16 additions and 54 deletions

View File

@@ -5,13 +5,11 @@ import (
"strings"
"testing"
"github.com/hashicorp/nomad/ci"
"github.com/mitchellh/cli"
"github.com/stretchr/testify/require"
)
func TestCommand_Ui(t *testing.T) {
ci.Parallel(t)
type testCaseSetupFn func(*testing.T)