Fixed the api tests
This commit is contained in:
parent
b083a3f307
commit
33fc6b88d3
|
@ -20,7 +20,7 @@ func TestCompose(t *testing.T) {
|
|||
&NetworkResource{
|
||||
CIDR: "0.0.0.0/0",
|
||||
MBits: 100,
|
||||
ReservedPorts: []int{80, 443},
|
||||
ReservedPorts: []Port{{"", 80}, {"", 443}},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
@ -83,9 +83,9 @@ func TestCompose(t *testing.T) {
|
|||
&NetworkResource{
|
||||
CIDR: "0.0.0.0/0",
|
||||
MBits: 100,
|
||||
ReservedPorts: []int{
|
||||
80,
|
||||
443,
|
||||
ReservedPorts: []Port{
|
||||
{"", 80},
|
||||
{"", 443},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -97,7 +97,7 @@ func TestCompose(t *testing.T) {
|
|||
Operand: "=",
|
||||
},
|
||||
},
|
||||
Config: map[string]string{
|
||||
Config: map[string]interface{}{
|
||||
"foo": "bar",
|
||||
},
|
||||
Meta: map[string]string{
|
||||
|
|
|
@ -130,7 +130,7 @@ func TestTask_SetConfig(t *testing.T) {
|
|||
|
||||
// Set another config value
|
||||
task.SetConfig("baz", "zip")
|
||||
expect := map[string]string{"foo": "bar", "baz": "zip"}
|
||||
expect := map[string]interface{}{"foo": "bar", "baz": "zip"}
|
||||
if !reflect.DeepEqual(task.Config, expect) {
|
||||
t.Fatalf("expect: %#v, got: %#v", expect, task.Config)
|
||||
}
|
||||
|
@ -171,7 +171,7 @@ func TestTask_Require(t *testing.T) {
|
|||
&NetworkResource{
|
||||
CIDR: "0.0.0.0/0",
|
||||
MBits: 100,
|
||||
ReservedPorts: []int{80, 443},
|
||||
ReservedPorts: []Port{{"", 80}, {"", 443}},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue