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)
 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 5
0
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
Ejemplo n.º 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