Ejemplo n.º 1
0
 def test_construct_test_command_invalid_name_lib(
         self, fake_lib_get_volumes, fake_app_get_volumes, fake_update_nfs,
         fake_ensure_current_image, fake_expanded_libs,
         fake_get_docker_client, fake_initialize_vm):
     fake_expanded_libs.return_value = self.specs
     with self.assertRaises(RuntimeError):
         test._construct_test_command('lib-a', 'run_tests', [])
Ejemplo n.º 2
0
 def test_construct_test_command_lib_no_arguments(
         self, fake_lib_get_volumes, fake_app_get_volumes, fake_update_nfs,
         fake_ensure_current_image, fake_expanded_libs,
         fake_get_docker_client, fake_initialize_vm):
     fake_expanded_libs.return_value = self.specs
     return_command = test._construct_test_command('lib-a', 'nose', [])
     self.assertEquals(
         'sh /command_files/dusty_command_file_lib-a_test_nose.sh',
         return_command.strip())
Ejemplo n.º 3
0
 def test_construct_test_command_lib_arguments(self, *args):
     return_command = test._construct_test_command(self.specs['libs']['lib-a'], 'nose', ['1', '2', '3'])
     self.assertEquals('sh -c "cd /lib-a; nosetests lib-a 1 2 3"', return_command.strip())
Ejemplo n.º 4
0
 def test_construct_test_command_app_no_arguments(self, *args):
     return_command = test._construct_test_command(self.specs['apps']['app-a'], 'nose', [])
     self.assertEquals('sh -c "cd /app-a; nosetests app-a"', return_command.strip())
Ejemplo n.º 5
0
 def test_construct_test_command_invalid_name_lib(self, *args):
     with self.assertRaises(RuntimeError):
         test._construct_test_command(self.specs['libs']['lib-a'], 'run_tests', [])
Ejemplo n.º 6
0
 def test_construct_test_command_lib_arguments(self, *args):
     return_command = test._construct_test_command(self.specs["libs"]["lib-a"], "nose", ["1", "2", "3"])
     self.assertEquals("sh /command_files/dusty_command_file_lib-a_test_nose.sh 1 2 3", return_command.strip())
Ejemplo n.º 7
0
 def test_construct_test_command_app_no_arguments(self, *args):
     return_command = test._construct_test_command(self.specs["apps"]["app-a"], "nose", [])
     self.assertEquals("sh /command_files/dusty_command_file_app-a_test_nose.sh", return_command.strip())
Ejemplo n.º 8
0
 def test_construct_test_command_invalid_name_lib(self, *args):
     with self.assertRaises(RuntimeError):
         test._construct_test_command(self.specs["libs"]["lib-a"], "run_tests", [])
Ejemplo n.º 9
0
 def test_construct_test_command_lib_arguments(self, fake_lib_get_volumes,
                                              fake_app_get_volumes, fake_update_nfs, fake_ensure_current_image,
                                              fake_expanded_libs, fake_get_docker_client, fake_initialize_vm):
     fake_expanded_libs.return_value = self.specs
     return_command = test._construct_test_command('lib-a', 'nose', ['1', '2', '3'])
     self.assertEquals('sh /command_files/dusty_command_file_lib-a_test_nose.sh 1 2 3', return_command.strip())
Ejemplo n.º 10
0
 def test_construct_test_command_invalid_name_lib(self, fake_lib_get_volumes,
                                              fake_app_get_volumes, fake_update_nfs, fake_ensure_current_image,
                                              fake_expanded_libs, fake_get_docker_client, fake_initialize_vm):
     fake_expanded_libs.return_value = self.specs
     with self.assertRaises(RuntimeError):
         test._construct_test_command('lib-a', 'run_tests', [])