Exemplo n.º 1
0
 def test_dmg_with_target(self, extract_dmg):
     """ Test the dmg extracting to a specific target """
     with set_os_types(osx=True):
         self.environment.run_feature("dmg_with_target", 'sync')
         extract_dmg.assert_called_with(TEST_DMG,
                                        '/testpath',
                                        remove_common_prefix=False)
Exemplo n.º 2
0
 def test_install(self):
     with patch('sprinter.lib.extract_targz') as extract_targz:
         with set_os_types(debian=True):
             with patch('sprinter.lib.call') as call:
                 self.environment.run_feature("install", 'sync')
                 ok_(extract_targz.called)
                 ok_(call.caled)
Exemplo n.º 3
0
 def test_install(self):
     with patch('sprinter.lib.extract_targz') as extract_targz:
         with set_os_types(debian=True):
             with patch('sprinter.lib.call') as call:
                 self.environment.run_feature("install", 'sync')
                 ok_(extract_targz.called)
                 ok_(call.caled)
Exemplo n.º 4
0
 def test_simple_example_fedora(self, call):
     """ A yum package should install properly on fedora """
     with set_os_types(fedora=True):
         self.environment.run_feature('simple_example', 'sync')
         call.assert_called_with("sudo yum install git-core",
                                 output_log_level=logging.DEBUG,
                                 stdout=None)
Exemplo n.º 5
0
 def test_update_different_package(self, call):
     """ An feature with a new formula """
     with set_os_types(debian=True):
         self.environment.run_feature('update_new_package', 'sync')
         call.assert_called_with("sudo apt-get -y install gitB",
                                 output_log_level=logging.DEBUG,
                                 stdout=None)
Exemplo n.º 6
0
 def test_simple_example_osx(self, call):
     """ A brew package should install on osx """
     with set_os_types(osx=True):
         self.environment.run_feature('simple_example', 'sync')
         call.assert_called_with("brew install git",
                                 output_log_level=logging.DEBUG,
                                 stdout=None)
Exemplo n.º 7
0
 def test_simple_example_debian(self, call):
     """ An apt-get package should install on debian """
     with set_os_types(debian=True):
         self.environment.run_feature('simple_example', 'sync')
         call.assert_called_with("sudo apt-get -y install git-core",
                                 output_log_level=logging.DEBUG,
                                 stdout=None)
Exemplo n.º 8
0
 def test_dmg_with_target(self, extract_dmg):
     """ Test the dmg extracting to a specific target """
     with set_os_types(osx=True):
         self.environment.run_feature("dmg_with_target", 'sync')
         extract_dmg.assert_called_with(TEST_DMG, '/testpath', remove_common_prefix=False)
Exemplo n.º 9
0
 def test_update_different_package(self, call):
     """ An feature with a new formula """
     with set_os_types(debian=True):
         self.environment.run_feature('update_new_package', 'sync')
         call.assert_called_with("sudo apt-get -y install gitB", output_log_level=logging.DEBUG, stdout=None)
Exemplo n.º 10
0
 def test_simple_example_fedora(self, call):
     """ A yum package should install properly on fedora """
     with set_os_types(fedora=True):
         self.environment.run_feature('simple_example', 'sync')
         call.assert_called_with("sudo yum install git-core", output_log_level=logging.DEBUG, stdout=None)
Exemplo n.º 11
0
 def test_simple_example_debian(self, call):
     """ An apt-get package should install on debian """
     with set_os_types(debian=True):
         self.environment.run_feature('simple_example', 'sync')
         call.assert_called_with("sudo apt-get -y install git-core", output_log_level=logging.DEBUG, stdout=None)
Exemplo n.º 12
0
 def test_simple_example_osx(self, call):
     """ A brew package should install on osx """
     with set_os_types(osx=True):
         self.environment.run_feature('simple_example', 'sync')
         call.assert_called_with("brew install git", output_log_level=logging.DEBUG, stdout=None)