diff --git a/app/api_topologies_test.go b/app/api_topologies_test.go index cf075f41c..ea23b7945 100644 --- a/app/api_topologies_test.go +++ b/app/api_topologies_test.go @@ -67,7 +67,7 @@ func TestContainerLabelFilter(t *testing.T) { // only the filtered container with fixture.TestLabelKey1 should be present equals(t, 1, len(topologySummaries)) for key := range topologySummaries { - equals(t, fixture.ClientContainerID+";", key) + equals(t, report.MakeContainerNodeID(fixture.ClientContainerID), key) } } @@ -79,8 +79,8 @@ func TestContainerLabelFilterExclude(t *testing.T) { // all containers but the excluded container should be present for key := range topologySummaries { - if fixture.ServerContainerNodeID+";" == key { - t.Errorf("TestAPITopologyNegativeContainerLabelFilter Failed. Expected to not find " + fixture.ServerContainerNodeID + "; in report") + if report.MakeContainerNodeID(fixture.ServerContainerNodeID) == key { + t.Errorf("TestAPITopologyNegativeContainerLabelFilter Failed. Expected to not find " + report.MakeContainerNodeID(fixture.ServerContainerNodeID) + " in report") } } } diff --git a/prog/main.go b/prog/main.go index 16334a70d..956549cea 100644 --- a/prog/main.go +++ b/prog/main.go @@ -180,7 +180,7 @@ func (c *containerLabelFiltersFlag) toAPITopologyOption(flagValue string, filter containerFilterLabel := unescapeBackslashes.ReplaceAllString(labelStringEscaped, `$1`) labelKeyValuePair := strings.Split(containerFilterLabel, "=") if len(labelKeyValuePair) != 2 { - return app.APITopologyOption{}, fmt.Errorf("Docker label in the app.container-label-filter(-exclude) flag isn't in the correct key=value format") + return app.APITopologyOption{}, fmt.Errorf("Docker label isn't in the correct key=value format") } filterFunction := render.HasLabel