コード例 #1
0
 def test_success_rgw(self):
     keytype = 'rgw'
     rc = gatherkeys.gatherkeys_missing(self.args, self.distro,
                                        self.rlogger, self.keypath_remote,
                                        keytype, self.test_dir)
     assert rc is True
     keyname = gatherkeys.keytype_path_to(self.args, keytype)
     keypath_gen = os.path.join(self.test_dir, keyname)
     assert os.path.isfile(keypath_gen)
コード例 #2
0
 def test_remoto_process_check_rc_error(self):
     keytype = 'admin'
     rc = gatherkeys.gatherkeys_missing(self.args, self.distro,
                                        self.rlogger, self.keypath_remote,
                                        keytype, self.test_dir)
     assert rc is False
     keyname = gatherkeys.keytype_path_to(self.args, keytype)
     keypath_gen = os.path.join(self.test_dir, keyname)
     assert not os.path.isfile(keypath_gen)
コード例 #3
0
 def test_success_mgr(self):
     keytype = 'mgr'
     rc = gatherkeys.gatherkeys_missing(
         self.args,
         self.distro,
         self.rlogger,
         self.keypath_remote,
         keytype,
         self.test_dir
         )
     assert rc is True
     keyname = gatherkeys.keytype_path_to(self.args, keytype)
     keypath_gen = os.path.join(self.test_dir, keyname)
     assert os.path.isfile(keypath_gen)
コード例 #4
0
 def test_remoto_process_check_rc_error(self):
     keytype = 'admin'
     rc = gatherkeys.gatherkeys_missing(
         self.args,
         self.distro,
         self.rlogger,
         self.keypath_remote,
         keytype,
         self.test_dir
         )
     assert rc is False
     keyname = gatherkeys.keytype_path_to(self.args, keytype)
     keypath_gen = os.path.join(self.test_dir, keyname)
     assert not os.path.isfile(keypath_gen)
コード例 #5
0
ファイル: test_gather_keys.py プロジェクト: ceph/ceph-deploy
def mock_get_keys_sucess_dynamic(args, host, dest_dir):
    for keytype in ["admin", "mon", "osd", "mds", "mgr", "rgw"]:
        keypath = gatherkeys.keytype_path_to(args, keytype)
        path = "%s/%s" % (dest_dir, keypath)
        get_key_dynamic(keytype, path)
    return True
コード例 #6
0
def mock_get_keys_sucess_dynamic(args, host, dest_dir):
    for keytype in ["admin", "mon", "osd", "mds", "rgw"]:
        keypath = gatherkeys.keytype_path_to(args, keytype)
        path = "%s/%s" % (dest_dir, keypath)
        get_key_dynamic(keytype, path)
    return True