tasks updated
This commit is contained in:
parent
12de69a66f
commit
bc500a536c
|
@ -359,6 +359,9 @@ func tasksUpdated(a, b *structs.TaskGroup) bool {
|
|||
if !reflect.DeepEqual(at.Artifacts, bt.Artifacts) {
|
||||
return true
|
||||
}
|
||||
if !reflect.DeepEqual(at.Vault, bt.Vault) {
|
||||
return true
|
||||
}
|
||||
|
||||
// Inspect the network to see if the dynamic ports are different
|
||||
if len(at.Resources.Networks) != len(bt.Resources.Networks) {
|
||||
|
|
|
@ -540,6 +540,12 @@ func TestTasksUpdated(t *testing.T) {
|
|||
if !tasksUpdated(j1.TaskGroups[0], j14.TaskGroups[0]) {
|
||||
t.Fatalf("bad")
|
||||
}
|
||||
|
||||
j15 := mock.Job()
|
||||
j15.TaskGroups[0].Tasks[0].Vault = &structs.Vault{Policies: []string{"foo"}}
|
||||
if !tasksUpdated(j1.TaskGroups[0], j15.TaskGroups[0]) {
|
||||
t.Fatalf("bad")
|
||||
}
|
||||
}
|
||||
|
||||
func TestEvictAndPlace_LimitLessThanAllocs(t *testing.T) {
|
||||
|
|
Loading…
Reference in a new issue