diff options
author | Madeline Stager <stager.madeline@gmail.com> | 2017-12-04 20:01:00 -0600 |
---|---|---|
committer | Madeline Stager <stager.madeline@gmail.com> | 2017-12-05 12:28:28 -0600 |
commit | 16cc8437de1b1a48d02ad078c0b42e8999dccf21 (patch) | |
tree | 6db9bb7d284fcefeb1f0a1b380c7741f9afb4079 /tests/acceptance/cli_test.py | |
parent | ed841e2b0e84f5e6374a4065c917906293c8990e (diff) |
Raise error if up used with both -d and --timeout
Fix #5434
Signed-off-by: Madeline Stager <stager.madeline@gmail.com>
Diffstat (limited to 'tests/acceptance/cli_test.py')
-rw-r--r-- | tests/acceptance/cli_test.py | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/tests/acceptance/cli_test.py b/tests/acceptance/cli_test.py index 8468dfbd..ab5719c2 100644 --- a/tests/acceptance/cli_test.py +++ b/tests/acceptance/cli_test.py @@ -1280,18 +1280,9 @@ class CLITestCase(DockerClientTestCase): ['up', '-d', '--force-recreate', '--no-recreate'], returncode=1) - def test_up_with_timeout(self): - self.dispatch(['up', '-d', '-t', '1']) - service = self.project.get_service('simple') - another = self.project.get_service('another') - self.assertEqual(len(service.containers()), 1) - self.assertEqual(len(another.containers()), 1) - - # Ensure containers don't have stdin and stdout connected in -d mode - config = service.containers()[0].inspect()['Config'] - self.assertFalse(config['AttachStderr']) - self.assertFalse(config['AttachStdout']) - self.assertFalse(config['AttachStdin']) + def test_up_with_timeout_detached(self): + result = self.dispatch(['up', '-d', '-t', '1'], returncode=1) + assert "-d and --timeout cannot be combined." in result.stderr def test_up_handles_sigint(self): proc = start_process(self.base_dir, ['up', '-t', '2']) |