Test Check.Header add/removes

This commit is contained in:
Michael Schurter
2017-09-28 17:08:43 -07:00
parent c0696bff0b
commit c39641eb9d

View File

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