e2e add deployment to the list of e2e tests, minor fixes

This commit is contained in:
Lang Martin 2019-05-21 09:21:44 -04:00
parent 2a11d66258
commit fe69f89476
5 changed files with 6 additions and 3 deletions

View file

@ -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)
}

View file

@ -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" {

View file

@ -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" {

View file

@ -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"

View file

@ -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)
})
}