test: properly skip client state in beforeall

This commit is contained in:
Michael Schurter
2019-03-22 06:42:04 -07:00
parent 3829fc0ee0
commit 8cd191dd39

View File

@@ -42,6 +42,10 @@ type ClientStateTC struct {
}
func (tc *ClientStateTC) BeforeAll(f *framework.F) {
if os.Getenv("NOMAD_TEST_STATE") == "" {
f.T().Skip("Skipping very slow state corruption test unless NOMAD_TEST_STATE=1")
}
bin, err := discover.NomadExecutable()
f.NoError(err)
tc.bin = bin
@@ -77,10 +81,6 @@ func getPID(client *api.Client, alloc *api.Allocation, path string) (int, error)
// TestClientState_Kill force kills Nomad agents and restarts them in a tight
// loop to assert Nomad is crash safe.
func (tc *ClientStateTC) TestClientState_Kill(f *framework.F) {
if os.Getenv("NOMAD_TEST_STATE") == "" {
f.T().Skip("Skipping very slow state corruption test unless NOMAD_TEST_STATE=1")
}
t := f.T()
t.Parallel()