diff --git a/test/integration/component/test_configdrive.py b/test/integration/component/test_configdrive.py index 46494f0bd65..3df175f672f 100644 --- a/test/integration/component/test_configdrive.py +++ b/test/integration/component/test_configdrive.py @@ -635,7 +635,7 @@ class ConfigDriveUtils: """ ssh.execute("umount -d %s" % mount_path) # Give the VM time to unlock the iso device - time.sleep(2) + time.sleep(0.5) # Verify umount result = ssh.execute("ls %s" % mount_path) self.assertTrue(len(result) == 0, @@ -1089,10 +1089,8 @@ class ConfigDriveUtils: vm.details = vm_new_ssh.details - # reset SSH key also resets the password. - self._decrypt_password(vm) - - vm.password_test = ConfigDriveUtils.PasswordTest(vm=vm) + # reset SSH key also removes the password (see https://github.com/apache/cloudstack/pull/4819) + vm.password_test = ConfigDriveUtils.PasswordTest(expect_pw=False) vm.key_pair = self.keypair if public_ip: @@ -1119,7 +1117,7 @@ class ConfigDriveUtils: cipher = PKCS1_v1_5.new(key) new_password = cipher.decrypt(b64decode(password_), None) if new_password: - vm.password = new_password + vm.password = new_password.decode() else: self.fail("Failed to decrypt new password") except ImportError: @@ -1511,7 +1509,6 @@ class TestConfigDrive(cloudstackTestCase, ConfigDriveUtils): tries = 1 if negative_test else 3 private_key_file_location = keypair.private_key_file if keypair else None - @retry(tries=tries) def retry_ssh(): ssh_client = vm.get_ssh_client( ipaddress=public_ip.ipaddress.ipaddress, @@ -1732,8 +1729,7 @@ class TestConfigDrive(cloudstackTestCase, ConfigDriveUtils): self.api_client.restartVPC(cmd) self.debug("Restarted VPC with ID - %s" % vpc.id) - # was tags=["advanced", "isonw"] - @attr(tags=["TODO"], required_hardware="true") + @attr(tags=["advanced", "isonw"], required_hardware="true") def test_configdrive_isolated_network(self): """Test Configdrive as provider for isolated Networks to provide userdata and password reset functionality @@ -2500,6 +2496,7 @@ class TestConfigDrive(cloudstackTestCase, ConfigDriveUtils): # ===================================================================== self.debug("+++ Scenario: " "validate updated userdata after migrate") + time.sleep(30) host = self.migrate_VM(vm) vm.hostname = host.name self.then_config_drive_is_as_expected(vm, public_ip_1, metadata=True)