summaryrefslogtreecommitdiff
path: root/libpod/container_graph_test.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-03-28 10:56:59 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-03-29 02:18:45 +0000
commitd0c983563129c804d2c974b05cc7d3604957f51a (patch)
tree63e88707f9214cd4c9dfb58e01c9f42209b03ead /libpod/container_graph_test.go
parentb0526caa93fc9a2add0cab5520a12f18e232e54a (diff)
downloadpodman-d0c983563129c804d2c974b05cc7d3604957f51a.tar.gz
podman-d0c983563129c804d2c974b05cc7d3604957f51a.tar.bz2
podman-d0c983563129c804d2c974b05cc7d3604957f51a.zip
Fix tests
Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #557 Approved by: rhatdan
Diffstat (limited to 'libpod/container_graph_test.go')
-rw-r--r--libpod/container_graph_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/libpod/container_graph_test.go b/libpod/container_graph_test.go
index 2303a05dd..bba3d7aad 100644
--- a/libpod/container_graph_test.go
+++ b/libpod/container_graph_test.go
@@ -35,7 +35,7 @@ func TestBuildContainerGraphOneCtr(t *testing.T) {
assert.Equal(t, ctr1.ID(), node.id)
assert.Equal(t, ctr1.ID(), graph.noDepNodes[0].id)
- assert.Equal(t, ctr1.ID(), graph.notDependedOnNodes[0].id)
+ assert.Equal(t, ctr1.ID(), graph.notDependedOnNodes[ctr1.ID()].id)
}
func TestBuildContainerGraphTwoCtrNoEdge(t *testing.T) {
@@ -81,7 +81,7 @@ func TestBuildContainerGraphTwoCtrOneEdge(t *testing.T) {
assert.Equal(t, 1, len(graph.notDependedOnNodes))
assert.Equal(t, ctr1.ID(), graph.noDepNodes[0].id)
- assert.Equal(t, ctr2.ID(), graph.notDependedOnNodes[0].id)
+ assert.Equal(t, ctr2.ID(), graph.notDependedOnNodes[ctr2.ID()].id)
}
func TestBuildContainerGraphTwoCtrCycle(t *testing.T) {
@@ -190,7 +190,7 @@ func TestBuildContainerGraphThreeContainersNoCycle(t *testing.T) {
assert.Equal(t, 1, len(graph.notDependedOnNodes))
assert.Equal(t, ctr3.ID(), graph.noDepNodes[0].id)
- assert.Equal(t, ctr1.ID(), graph.notDependedOnNodes[0].id)
+ assert.Equal(t, ctr1.ID(), graph.notDependedOnNodes[ctr1.ID()].id)
}
func TestBuildContainerGraphFourContainersNoEdges(t *testing.T) {