From 8ef366ec490b52e4a1564730f7a6aaf651592878 Mon Sep 17 00:00:00 2001 From: Kyle Havlovitz Date: Thu, 12 Jan 2017 19:30:49 -0500 Subject: [PATCH] Fix inconsistency in TestStateStore_ServicesByNodeMeta --- consul/state/state_store_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/consul/state/state_store_test.go b/consul/state/state_store_test.go index 8554230671..52ecb7e57f 100644 --- a/consul/state/state_store_test.go +++ b/consul/state/state_store_test.go @@ -1204,8 +1204,9 @@ func TestStateStore_ServicesByNodeMeta(t *testing.T) { t.Fatalf("bad index: %d", idx) } expected := structs.Services{ - "redis": []string{"prod", "master"}, + "redis": []string{"master", "prod"}, } + sort.Strings(res["redis"]) if !reflect.DeepEqual(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) } expected = structs.Services{ - "redis": []string{"prod", "master", "slave"}, + "redis": []string{"master", "prod", "slave"}, } sort.Strings(res["redis"]) - sort.Strings(expected["redis"]) if !reflect.DeepEqual(res, expected) { t.Fatalf("bad: %v %v", res, expected) }