Example #1
0
 def test_compile_command_with_once(self, *args):
     expected_command_list = ["sh -c \"cd /gc/lib1 && ./install.sh",
                              " cd /gc/lib2 && python setup.py develop",
                              " cd /gc/app1",
                              " export PATH=$PATH:/gc/app1",
                              " if [ ! -f /var/run/dusty/docker_first_time_started ]",
                              " then mkdir -p /var/run/dusty",
                              " touch /var/run/dusty/docker_first_time_started",
                              " one_time.sh",
                              " fi",
                              " always.sh\""]
     returned_command = _compile_docker_command('app1', basic_specs).split(";")
     self.assertEqual(expected_command_list, returned_command)
Example #2
0
 def test_compile_command_without_once(self, *args):
     new_specs = copy(basic_specs)
     new_specs['apps']['app1']['commands']['once'] = ['']
     expected_command_list = "sh /command_files/dusty_command_file_app1.sh"
     returned_command = _compile_docker_command(new_specs['apps']['app1'])
     self.assertEqual(expected_command_list, returned_command)
Example #3
0
 def test_compile_command_with_once(self, *args):
     expected_command_list = "sh /command_files/dusty_command_file_app1.sh"
     returned_command = _compile_docker_command(basic_specs['apps']['app1'])
     self.assertEqual(expected_command_list, returned_command)
Example #4
0
File: test.py Project: apeace/dusty
 def test_compile_command_without_once(self, *args):
     new_specs = copy(basic_specs)
     new_specs['apps']['app1']['commands']['once'] = ['']
     expected_command_list = "sh /command_files/dusty_command_file_app1.sh"
     returned_command = _compile_docker_command(new_specs['apps']['app1'])
     self.assertEqual(expected_command_list, returned_command)
Example #5
0
File: test.py Project: apeace/dusty
 def test_compile_command_with_once(self, *args):
     expected_command_list = "sh /command_files/dusty_command_file_app1.sh"
     returned_command = _compile_docker_command(basic_specs['apps']['app1'])
     self.assertEqual(expected_command_list, returned_command)