Fixed the api tests

This commit is contained in:
Diptanu Choudhury 2015-11-14 17:30:36 -08:00 committed by Alex Dadgar
parent b083a3f307
commit 33fc6b88d3
2 changed files with 7 additions and 7 deletions

View File

@ -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{

View File

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