diff --git a/nomad/structs/diff_test.go b/nomad/structs/diff_test.go index eff0d2fca..379f1a239 100644 --- a/nomad/structs/diff_test.go +++ b/nomad/structs/diff_test.go @@ -3196,6 +3196,9 @@ func TestTaskDiff(t *testing.T) { Protocol: "http", Interval: 1 * time.Second, Timeout: 1 * time.Second, + Header: map[string][]string{ + "Foo": {"bar"}, + }, }, { Name: "bar", @@ -3245,6 +3248,9 @@ func TestTaskDiff(t *testing.T) { Protocol: "http", Interval: 1 * time.Second, Timeout: 1 * time.Second, + Header: map[string][]string{ + "Eggs": {"spam"}, + }, }, { Name: "bam", @@ -3278,6 +3284,20 @@ func TestTaskDiff(t *testing.T) { New: "tcp", }, }, + Objects: []*ObjectDiff{ + { + Type: DiffTypeAdded, + Name: "Header", + Fields: []*FieldDiff{ + { + Type: DiffTypeAdded, + Name: "Eggs[0]", + Old: "", + New: "spam", + }, + }, + }, + }, }, { Type: DiffTypeAdded, @@ -3386,6 +3406,19 @@ func TestTaskDiff(t *testing.T) { New: "", }, }, + Objects: []*ObjectDiff{ + { + Type: DiffTypeDeleted, + Name: "Header", + Fields: []*FieldDiff{ + { + Type: DiffTypeDeleted, + Name: "Foo[0]", + Old: "bar", + }, + }, + }, + }, }, }, },