Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion tests/integration_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,14 +351,18 @@ def runTest(self):

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)
self.tmp_containers.append(res['Id'])
self.client.rename(res, name)
inspect = self.client.inspect_container(res['Id'])
self.assertIn('Name', inspect)
self.assertEqual(name, inspect['Name'])
if version == '1.5.0':
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it make sense to use compare_version here? so when 1.6 lands, one does not need to change the test again.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We won't need to change the tests for 1.6? compare_version doesn't work well with the -dev suffix, and we want 1.5.0-dev (and any version after that) to take the else path here.

self.assertEqual(name, inspect['Name'])
else:
self.assertEqual('/{0}'.format(name), inspect['Name'])


class TestStartContainer(BaseTestCase):
Expand Down