From cceb7164e2a47340eee027d438146ec262b9e6c1 Mon Sep 17 00:00:00 2001 From: Ben Plunkert Date: Thu, 10 Jul 2014 10:44:02 -0700 Subject: [PATCH] loosening serverspec image matching to allow for tags --- test/shared/support/docker_container.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/shared/support/docker_container.rb b/test/shared/support/docker_container.rb index 08e889a6d3..228cb4c49c 100644 --- a/test/shared/support/docker_container.rb +++ b/test/shared/support/docker_container.rb @@ -40,12 +40,14 @@ def find_container containers = Docker::Container.all(:all => true) containers.each do |container| if @command == nil - if container.info['Image'] == @image + if container.info['Image'] == @image || container.info['Image'].split(':').first == @image return container end else - if container.info['Command'] == @command && container.info['Image'] == @image - return container + if container.info['Command'] == @command + if container.info['Image'] == @image || container.info['Image'].split(':').first == @image + return container + end end end end