예제 #1
0
 def test_check_deploy_prerequesites_day1_with_minion(self):
     self.fs.create_file(
         os.path.join(self.states_fs_path(), 'ceph-salt.sls'))
     self.assertEqual(
         CephSaltExecutor.check_deploy_prerequesites('node1.test.com'), 4)
     self.fs.remove_object(
         os.path.join(self.states_fs_path(), 'ceph-salt.sls'))
예제 #2
0
 def test_check_deploy_prerequesites_day2_without_minion(self):
     self.fs.create_file(
         os.path.join(self.states_fs_path(), 'ceph-salt.sls'))
     CephOrchMock.host_ls_result = [{'host': 'node1.test.com'}]
     self.assertEqual(CephSaltExecutor.check_deploy_prerequesites(None), 5)
     CephOrchMock.host_ls_result = []
     self.fs.remove_object(
         os.path.join(self.states_fs_path(), 'ceph-salt.sls'))
예제 #3
0
 def test_check_deploy_prerequesites_formula_exists3(self):
     SaltUtilMock.sync_all_result = False
     self.fs.create_file(
         os.path.join(self.states_fs_path(), 'ceph-salt.sls'))
     self.assertEqual(CephSaltExecutor.check_deploy_prerequesites(None), 3)
     SaltUtilMock.sync_all_result = True
     self.fs.remove_object(
         os.path.join(self.states_fs_path(), 'ceph-salt.sls'))
예제 #4
0
 def test_check_deploy_prerequesites_formula_exists2(self):
     self.assertEqual(CephSaltExecutor.check_deploy_prerequesites(None), 2)
예제 #5
0
 def test_check_deploy_prerequesites_formula_exists1(self):
     ServiceMock.restart_result = False
     self.assertEqual(CephSaltExecutor.check_deploy_prerequesites(None), 1)
     ServiceMock.restart_result = True
예제 #6
0
 def test_check_deploy_prerequesites_formula_exists(self):
     self.fs.create_file(
         os.path.join(self.states_fs_path(), 'ceph-salt.sls'))
     self.assertEqual(CephSaltExecutor.check_deploy_prerequesites(None), 0)
     self.fs.remove_object(
         os.path.join(self.states_fs_path(), 'ceph-salt.sls'))