mirror of
https://github.com/kemko/nomad.git
synced 2026-01-03 17:05:43 +03:00
Test Check.Header add/removes
This commit is contained in:
@@ -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",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user