Skip to content

Commit

Permalink
test: Add test__get_image_command_or_pull__works
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathonReinhart committed Sep 30, 2016
1 parent 86e6f26 commit 90f2628
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/test_dockerutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,18 @@ def mocked_popen(popen_args, *args, **kw):
with mock.patch('subprocess.Popen', side_effect=mocked_popen) as popen_mock:
assert_raises(uut.DockerError, uut.get_image_command, 'n/a')

def test__get_image_command_or_pull__works(self):
'''get_image_command_or_pull works'''
image = 'busybox:latest'

# First remove the image
subprocess.call(['docker', 'rmi', image])

# Now try to get the image's Command
result = uut.get_image_command_or_pull(image)

# Should return a non-empty string
self.assertTrue(result)


def test_make_vol_opt_no_opts(self):
Expand Down

0 comments on commit 90f2628

Please sign in to comment.