feature: [Marathon SD] fixed test cases

This commit is contained in:
Jiekun 2024-10-14 15:51:00 +08:00
parent a28c3a5afa
commit 4143af6127
No known key found for this signature in database
GPG key ID: 4674A8E5B0AAF6CE

View file

@ -91,7 +91,20 @@ func TestGetAppsList_Success(t *testing.T) {
t.Fatalf("unexpected error in GetAppsList(): %s", err) t.Fatalf("unexpected error in GetAppsList(): %s", err)
} }
expect := AppList{} expect := &AppList{
Apps: []app{
{
ID: "/myapp",
PortDefinitions: []portDefinition{
{
Labels: map[string]string{"pdl1": "pdl1", "pdl2": "pdl2"},
Port: 1999,
},
},
Labels: map[string]string{},
},
},
}
if !reflect.DeepEqual(apps, expect) { if !reflect.DeepEqual(apps, expect) {
t.Fatalf("unexpected result, got: %v, expect: %v", apps, expect) t.Fatalf("unexpected result, got: %v, expect: %v", apps, expect)
} }