From 1b7399d2849ef74d634f882381dda85056d731e1 Mon Sep 17 00:00:00 2001 From: Alfonso Acosta Date: Thu, 5 May 2016 19:18:26 +0000 Subject: [PATCH] Minor test improvement --- render/short_lived_connections_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/render/short_lived_connections_test.go b/render/short_lived_connections_test.go index 93cc78f54..be3196c45 100644 --- a/render/short_lived_connections_test.go +++ b/render/short_lived_connections_test.go @@ -140,14 +140,14 @@ func TestShortLivedInternetNodeConnections(t *testing.T) { func TestPauseContainerDiscarded(t *testing.T) { have := Prune(render.ContainerWithImageNameRenderer.Render(rpt, render.FilterNoop)) - // There should only be a single connection from container1 and the destination should be container2 + // There should only be a connection from container1 and the destination should be container2 container1, ok := have[container1NodeID] if !ok { t.Fatal("Expected output to have container1") } - if !container1.Adjacency.Contains(container2NodeID) { - t.Errorf("Expected container1 to have adjacency to %s, but only had %v", container2NodeID, container1.Adjacency) + if len(container1.Adjacency) != 1 || !container1.Adjacency.Contains(container2NodeID) { + t.Errorf("Expected container1 to have a unique adjacency to %s, but instead had %v", container2NodeID, container1.Adjacency) } }