simplify job, better error

This commit is contained in:
Drew Bailey 2020-02-04 13:59:39 -05:00
parent 8b6de8f3d2
commit 7bee040e61
No known key found for this signature in database
GPG key ID: FBA61B9FB7CCE1A7
3 changed files with 5 additions and 37 deletions

View file

@ -147,7 +147,7 @@ func WaitForAllocNotPending(t *testing.T, nomadClient *api.Client, allocID strin
return false, err
}
return alloc.ClientStatus != structs.AllocClientStatusPending, fmt.Errorf("expected status running, but was: %s", alloc.ClientStatus)
return alloc.ClientStatus != structs.AllocClientStatusPending, fmt.Errorf("expected status not pending, but was: %s", alloc.ClientStatus)
}, func(err error) {
t.Fatalf("failed to wait on alloc: %v", err)
})

View file

@ -1,4 +1,4 @@
job "redis" {
job "system_job" {
datacenters = ["dc1"]
type = "system"
@ -8,7 +8,7 @@ job "redis" {
value = "linux"
}
group "cache" {
group "system_job_group" {
count = 1
restart {
@ -32,22 +32,6 @@ job "redis" {
env {
version = "1"
}
logs {
max_files = 1
max_file_size = 9
}
resources {
cpu = 20 # 500 MHz
memory = 40 # 256MB
network {
mbits = 1
port "db" {}
}
}
}
}
}

View file

@ -1,4 +1,4 @@
job "redis" {
job "system_job" {
datacenters = ["dc1"]
type = "system"
@ -8,7 +8,7 @@ job "redis" {
value = "linux"
}
group "cache" {
group "system_job_group" {
count = 1
restart {
@ -32,22 +32,6 @@ job "redis" {
env {
version = "2"
}
logs {
max_files = 1
max_file_size = 9
}
resources {
cpu = 20 # 500 MHz
memory = 40 # 256MB
network {
mbits = 1
port "db" {}
}
}
}
}
}