mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user