Ver código fonte

Add missing test constraint

Signed-off-by: Joffrey F <[email protected]>
Joffrey F 8 anos atrás
pai
commit
803d5352e6
1 arquivos alterados com 2 adições e 1 exclusões
  1. 2 1
      tests/acceptance/cli_test.py

+ 2 - 1
tests/acceptance/cli_test.py

@@ -719,12 +719,13 @@ class CLITestCase(DockerClientTestCase):
     def test_run_one_off_with_volume_merge(self):
         self.base_dir = 'tests/fixtures/simple-composefile-volume-ready'
         volume_path = os.path.abspath(os.path.join(os.getcwd(), self.base_dir, 'files'))
-        create_host_file(self.client, os.path.join(volume_path, 'example.txt'))
+        node = create_host_file(self.client, os.path.join(volume_path, 'example.txt'))
 
         self.dispatch([
             '-f', 'docker-compose.merge.yml',
             'run',
             '-v', '{}:/data'.format(volume_path),
+            '-e', 'constraint:node=={}'.format(node if node is not None else '*'),
             'simple',
             'test', '-f', '/data/example.txt'
         ], returncode=0)