Kaydet (Commit) 21cc9916 authored tarafından Joffrey F's avatar Joffrey F

Rename test fix to take into account docker/docker#11003

üst 5ce02b9f
......@@ -351,6 +351,7 @@ class TestCreateContainerWithName(BaseTestCase):
class TestRenameContainer(BaseTestCase):
def runTest(self):
version = self.client.version()['Version']
name = 'hong_meiling'
res = self.client.create_container('busybox', 'true')
self.assertIn('Id', res)
......@@ -358,7 +359,10 @@ class TestRenameContainer(BaseTestCase):
self.client.rename(res, name)
inspect = self.client.inspect_container(res['Id'])
self.assertIn('Name', inspect)
if version == '1.5.0':
self.assertEqual(name, inspect['Name'])
else:
self.assertEqual('/{0}'.format(name), inspect['Name'])
class TestStartContainer(BaseTestCase):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment