diff --git a/test/integration/smoke/test_events_resource.py b/test/integration/smoke/test_events_resource.py index 794431109506..5394bf6ec6ea 100644 --- a/test/integration/smoke/test_events_resource.py +++ b/test/integration/smoke/test_events_resource.py @@ -20,10 +20,6 @@ import os import tempfile import time -import unittest -import urllib.error -import urllib.parse -import urllib.request from datetime import datetime @@ -170,6 +166,7 @@ def test_01_events_resource(self): account_network.update(self.apiclient, name=account_network.name + ts) account_network.delete(self.apiclient) self.cleanup.remove(account_network) + virtual_machine.start(self.apiclient) account.update(self.apiclient, newname=account.name + ts) account.disable(self.apiclient) account.delete(self.apiclient) diff --git a/test/integration/smoke/test_network_permissions.py b/test/integration/smoke/test_network_permissions.py index cd55c5af7452..94ee05d7baf9 100644 --- a/test/integration/smoke/test_network_permissions.py +++ b/test/integration/smoke/test_network_permissions.py @@ -733,12 +733,17 @@ def test_04_deploy_vm_for_other_user_and_test_vm_operations(self): self.exec_command("self.user_apiclient", command, expected=False) self.exec_command("self.otheruser_apiclient", command, expected=True) - # 22. Destroy vm2, should succeed by vm owner + # 22. Start VM before destroying, to recreate ROOT volume that was deleted as part of restore operation + command = """self.virtual_machine.start({apiclient})""" + self.exec_command("self.user_apiclient", command, expected=False) + self.exec_command("self.otheruser_apiclient", command, expected=True) + + # 23. Destroy vm2, should succeed by vm owner command = """self.virtual_machine.delete({apiclient}, expunge=False)""" self.exec_command("self.user_apiclient", command, expected=False) self.exec_command("self.otheruser_apiclient", command, expected=True) - # 23. Recover vm2, should succeed by vm owner + # 24. Recover vm2, should succeed by vm owner allow_expunge_recover_vm = Configurations.list(self.apiclient, name="allow.user.expunge.recover.vm")[0].value self.logger.debug("Global configuration allow.user.expunge.recover.vm = %s", allow_expunge_recover_vm) if allow_expunge_recover_vm == "true": @@ -746,12 +751,12 @@ def test_04_deploy_vm_for_other_user_and_test_vm_operations(self): self.exec_command("self.user_apiclient", command, expected=False) self.exec_command("self.otheruser_apiclient", command, expected=True) - # 24. Destroy vm2, should succeed by vm owner + # 25. Destroy vm2, should succeed by vm owner command = """self.virtual_machine.delete({apiclient}, expunge=False)""" self.exec_command("self.user_apiclient", command, expected=False) self.exec_command("self.otheruser_apiclient", command, expected=True) - # 25. Expunge vm2, should succeed by vm owner + # 26. Expunge vm2, should succeed by vm owner if allow_expunge_recover_vm == "true": command = """self.virtual_machine.expunge({apiclient})""" self.exec_command("self.user_apiclient", command, expected=False) @@ -759,7 +764,7 @@ def test_04_deploy_vm_for_other_user_and_test_vm_operations(self): else: self.virtual_machine.expunge(self.apiclient) - # 26. Reset network permissions, should succeed by network owner + # 27. Reset network permissions, should succeed by network owner command = """self.reset_network_permission({apiclient}, self.user_network, expected=True)""" self.exec_command("self.otheruser_apiclient", command, expected=False) self.exec_command("self.user_apiclient", command, expected=True)