def test_fail_capabilities_missing(self): keytype = 'mon' with pytest.raises(RuntimeError): gatherkeys.gatherkeys_missing( self.args, self.distro, self.rlogger, self.keypath_remote, keytype, self.test_dir )
def test_fail_identity_missing(self): keytype = 'silly' with pytest.raises(RuntimeError): gatherkeys.gatherkeys_missing( self.args, self.distro, self.rlogger, self.keypath_remote, keytype, self.test_dir )
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)
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)
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)