From c2b9cadad9b65f9da42c78264215191ad167a033 Mon Sep 17 00:00:00 2001 From: Roland Schilter Date: Tue, 6 Jun 2017 16:24:12 +0100 Subject: [PATCH] Fix assertions --- prog/main_test.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/prog/main_test.go b/prog/main_test.go index 4fbbbe5836..ca238c5073 100644 --- a/prog/main_test.go +++ b/prog/main_test.go @@ -14,17 +14,17 @@ func TestMakeContainerFiltersFromFlags(t *testing.T) { containerLabelFlags.Set(`ti\:tle2:lab\:el=2`) containerLabelFlags.Set(`ti tile3:label=3`) - err := containerLabelFlags.Set(`just a string`) + err := containerLabelFlags.Set("just a string") assert.NotNil(t, err, "Invalid container label flag not detected") apiTopologyOptions := containerLabelFlags.apiTopologyOptions assert.Equal(t, 3, len(apiTopologyOptions)) - assert.Equal(t, `title1`, apiTopologyOptions[0].Value) - assert.Equal(t, `label=1`, apiTopologyOptions[0].Label) - assert.Equal(t, `ti:tle2`, apiTopologyOptions[1].Value) - assert.Equal(t, `lab:el=2`, apiTopologyOptions[1].Label) - assert.Equal(t, `ti tle3`, apiTopologyOptions[2].Value) - assert.Equal(t, `label=3`, apiTopologyOptions[2].Label) + assert.Equal(t, "0", apiTopologyOptions[0].Value) + assert.Equal(t, "title1", apiTopologyOptions[0].Label) + assert.Equal(t, "1", apiTopologyOptions[1].Value) + assert.Equal(t, "ti:tle2", apiTopologyOptions[1].Label) + assert.Equal(t, "2", apiTopologyOptions[2].Value) + assert.Equal(t, "ti tile3", apiTopologyOptions[2].Label) } func TestLogCensoredArgs(t *testing.T) {