e2e: use -detach mode when registering jobs with cli
This PR changes the e2e helper thingy to set -detach option when registering a job with the CLI instead of the API. This is necessary for jobs which never become healthy, as the deployment never finishes for failing jobs and the command never returns, causing the test to timeout after 10 minutes.
This commit is contained in:
parent
0d9208f1a0
commit
80f4340b77
|
@ -12,7 +12,7 @@ import (
|
|||
// Register registers a jobspec from a file but with a unique ID.
|
||||
// The caller is responsible for recording that ID for later cleanup.
|
||||
func Register(jobID, jobFilePath string) error {
|
||||
cmd := exec.Command("nomad", "job", "run", "-")
|
||||
cmd := exec.Command("nomad", "job", "run", "-detach", "-")
|
||||
stdin, err := cmd.StdinPipe()
|
||||
if err != nil {
|
||||
return fmt.Errorf("could not open stdin?: %w", err)
|
||||
|
|
Loading…
Reference in a new issue