Browse Source

Fix inconsistency in TestStateStore_ServicesByNodeMeta

pull/2649/head
Kyle Havlovitz 8 years ago
parent
commit
8ef366ec49
No known key found for this signature in database
GPG Key ID: 8A5E6B173056AD6C
  1. 6
      consul/state/state_store_test.go

6
consul/state/state_store_test.go

@ -1204,8 +1204,9 @@ func TestStateStore_ServicesByNodeMeta(t *testing.T) {
t.Fatalf("bad index: %d", idx) t.Fatalf("bad index: %d", idx)
} }
expected := structs.Services{ expected := structs.Services{
"redis": []string{"prod", "master"}, "redis": []string{"master", "prod"},
} }
sort.Strings(res["redis"])
if !reflect.DeepEqual(res, expected) { if !reflect.DeepEqual(res, expected) {
t.Fatalf("bad: %v %v", res, expected) t.Fatalf("bad: %v %v", res, expected)
} }
@ -1219,10 +1220,9 @@ func TestStateStore_ServicesByNodeMeta(t *testing.T) {
t.Fatalf("bad index: %d", idx) t.Fatalf("bad index: %d", idx)
} }
expected = structs.Services{ expected = structs.Services{
"redis": []string{"prod", "master", "slave"}, "redis": []string{"master", "prod", "slave"},
} }
sort.Strings(res["redis"]) sort.Strings(res["redis"])
sort.Strings(expected["redis"])
if !reflect.DeepEqual(res, expected) { if !reflect.DeepEqual(res, expected) {
t.Fatalf("bad: %v %v", res, expected) t.Fatalf("bad: %v %v", res, expected)
} }

Loading…
Cancel
Save