From 65d15e604033089250b75d1f7db9cebd277bfa86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Mon, 26 Jun 2017 13:06:22 +0200 Subject: [PATCH] api/admin: skip firewall in vm.Clone This operation is going to be removed, so apply a quick fix for tests. QubesOS/qubes-issues#2622 --- qubes/api/admin.py | 2 +- qubes/tests/api_admin.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qubes/api/admin.py b/qubes/api/admin.py index 108e4555..ce198f19 100644 --- a/qubes/api/admin.py +++ b/qubes/api/admin.py @@ -853,7 +853,7 @@ class QubesAdminAPI(qubes.api.AbstractQubesAPI): dst_vm.clone_properties(src_vm) dst_vm.tags.update(src_vm.tags) dst_vm.features.update(src_vm.features) - dst_vm.firewall.clone(src_vm.firewall) + #dst_vm.firewall.clone(src_vm.firewall) for devclass in src_vm.devices: for device_assignment in src_vm.devices[devclass].assignments(): dst_vm.devices[devclass].attach(device_assignment.clone()) diff --git a/qubes/tests/api_admin.py b/qubes/tests/api_admin.py index 7eec7619..fde83162 100644 --- a/qubes/tests/api_admin.py +++ b/qubes/tests/api_admin.py @@ -1250,7 +1250,7 @@ class TC_00_VMs(AdminAPITestCase): self.assertEqual(vm.template, self.app.domains['test-template']) self.assertEqual(vm.tags, self.vm.tags) self.assertEqual(vm.features, self.vm.features) - self.assertEqual(vm.firewall, self.vm.firewall) + #self.assertEqual(vm.firewall, self.vm.firewall) self.assertEqual(mock_clone.mock_calls, [unittest.mock.call(self.app.domains['test-vm2']).clone( self.app.domains['test-vm1'])])