From fe69f894763cf7279a46be87f0c1d9f94e49af8d Mon Sep 17 00:00:00 2001 From: Lang Martin Date: Tue, 21 May 2019 09:21:44 -0400 Subject: [PATCH] e2e add deployment to the list of e2e tests, minor fixes --- e2e/deployment/deployment.go | 2 ++ e2e/deployment/input/deployment_auto0.nomad | 2 +- e2e/deployment/input/deployment_auto1.nomad | 2 +- e2e/e2e_test.go | 1 + e2e/e2eutil/utils.go | 2 +- 5 files changed, 6 insertions(+), 3 deletions(-) diff --git a/e2e/deployment/deployment.go b/e2e/deployment/deployment.go index a8a7f1fb5..aa21a5d44 100644 --- a/e2e/deployment/deployment.go +++ b/e2e/deployment/deployment.go @@ -60,6 +60,8 @@ func (tc *DeploymentTest) TestDeploymentAutoPromote(f *framework.F) { // Deployment is eventually running e2eutil.WaitForDeployment(t, nomadClient, deploy.ID, run, structs.DeploymentStatusDescriptionRunning) + + deploy, _, _ = nomadClient.Deployments().Info(deploy.ID, nil) require.Equal(t, run, deploy.Status) require.Equal(t, structs.DeploymentStatusDescriptionRunning, deploy.StatusDescription) } diff --git a/e2e/deployment/input/deployment_auto0.nomad b/e2e/deployment/input/deployment_auto0.nomad index 35aa278a2..badf549ac 100644 --- a/e2e/deployment/input/deployment_auto0.nomad +++ b/e2e/deployment/input/deployment_auto0.nomad @@ -32,7 +32,7 @@ job "deployment_auto.nomad" { max_parallel = 2 auto_promote = true canary = 2 - min_healthy_time = "5s" + min_healthy_time = "2s" } task "two" { diff --git a/e2e/deployment/input/deployment_auto1.nomad b/e2e/deployment/input/deployment_auto1.nomad index 6aba18a23..c1713e63b 100644 --- a/e2e/deployment/input/deployment_auto1.nomad +++ b/e2e/deployment/input/deployment_auto1.nomad @@ -32,7 +32,7 @@ job "deployment_auto.nomad" { max_parallel = 2 auto_promote = true canary = 2 - min_healthy_time = "5s" + min_healthy_time = "2s" } task "two" { diff --git a/e2e/e2e_test.go b/e2e/e2e_test.go index 264832340..10fde5f5a 100644 --- a/e2e/e2e_test.go +++ b/e2e/e2e_test.go @@ -8,6 +8,7 @@ import ( _ "github.com/hashicorp/nomad/e2e/clientstate" _ "github.com/hashicorp/nomad/e2e/consul" _ "github.com/hashicorp/nomad/e2e/consultemplate" + _ "github.com/hashicorp/nomad/e2e/deployment" _ "github.com/hashicorp/nomad/e2e/example" _ "github.com/hashicorp/nomad/e2e/nomad09upgrade" _ "github.com/hashicorp/nomad/e2e/nomadexec" diff --git a/e2e/e2eutil/utils.go b/e2e/e2eutil/utils.go index 1348a5646..212282cda 100644 --- a/e2e/e2eutil/utils.go +++ b/e2e/e2eutil/utils.go @@ -130,6 +130,6 @@ func WaitForDeployment(t *testing.T, nomadClient *api.Client, deployID string, s ) }, func(err error) { - t.Fatalf("failed to wait on alloc: %v", err) + t.Fatalf("failed to wait on deployment: %v", err) }) }