From 15d39f0dee0a0c2d2d9fdc3963ef3f2347f18460 Mon Sep 17 00:00:00 2001 From: Seth Hoenig Date: Fri, 18 Jun 2021 12:08:27 -0500 Subject: [PATCH] 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. --- e2e/e2eutil/job.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/e2eutil/job.go b/e2e/e2eutil/job.go index 96d29f67e..cb9029f57 100644 --- a/e2e/e2eutil/job.go +++ b/e2e/e2eutil/job.go @@ -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)