Esempio n. 1
0
 def test_execute_script_valid_input_not_accept_arguments(self, fake_exec_docker):
     execute_script('app-b', 'example', ['.', './', '..'])
     fake_exec_docker.assert_has_calls([])
Esempio n. 2
0
 def test_execute_script_script_not_found(self):
     with self.assertRaises(KeyError):
         execute_script('app-a', 'wrong name')
Esempio n. 3
0
 def test_execute_script_valid_input_three_args(self, fake_exec_docker):
     execute_script('app-a', 'example', ['.', './', '..'])
     fake_exec_docker.assert_called_once_with('exec', '-i', 'dusty_app-a_1', 'sh', '/command_files/dusty_command_file_app-a_script_example.sh', '.', './', '..')
Esempio n. 4
0
 def test_execute_script_nonexistent_app(self):
     with self.assertRaises(KeyError):
         execute_script('some-nonexistent-app', 'this arg should not matter')
Esempio n. 5
0
 def test_execute_script_no_scripts(self):
     with self.assertRaises(KeyError):
         execute_script('app-b', 'should not matter')
Esempio n. 6
0
 def test_execute_script_valid_input_not_accept_arguments(
         self, fake_exec_docker):
     execute_script('app-b', 'example', ['.', './', '..'])
     fake_exec_docker.assert_has_calls([])
Esempio n. 7
0
 def test_execute_script_valid_input_three_args(self, fake_exec_docker):
     execute_script('app-a', 'example', ['.', './', '..'])
     fake_exec_docker.assert_called_once_with(
         'exec', '-i', 'dusty_app-a_1', 'sh',
         '/command_files/dusty_command_file_app-a_script_example.sh', '.',
         './', '..')
Esempio n. 8
0
 def test_execute_script_script_not_found(self):
     with self.assertRaises(KeyError):
         execute_script('app-a', 'wrong name')
Esempio n. 9
0
 def test_execute_script_no_scripts(self):
     with self.assertRaises(KeyError):
         execute_script('app-b', 'should not matter')
Esempio n. 10
0
 def test_execute_script_nonexistent_app(self):
     with self.assertRaises(KeyError):
         execute_script('some-nonexistent-app',
                        'this arg should not matter')