test: update tests to properly use AllocDir

Also use t.TempDir when possible.
This commit is contained in:
Michael Schurter
2021-10-18 10:32:41 -07:00
parent f41b625532
commit eeb1da8a2e
10 changed files with 45 additions and 42 deletions

View File

@@ -201,7 +201,9 @@ func WaitForRunningWithToken(t testing.TB, rpc rpcFn, job *structs.Job, token st
var resp structs.JobAllocationsResponse
WaitForResult(func() (bool, error) {
// This can be quite slow if the job has expensive setup such as
// downloading large artifacts or creating a chroot.
WaitForResultRetries(2000*TestMultiplier(), func() (bool, error) {
args := &structs.JobSpecificRequest{}
args.JobID = job.ID
args.QueryOptions.Region = job.Region