diff --git a/instances/tests/test_live_dataloss.py b/instances/tests/test_live_dataloss.py index 188d8b30..32c43757 100644 --- a/instances/tests/test_live_dataloss.py +++ b/instances/tests/test_live_dataloss.py @@ -464,8 +464,9 @@ class LiveDataLossTestCase(TestCase): options = form("change_options") self.assertEqual(options["title"], "wvc-title") self.post("change_options", inst, {**options, "description": "wvc-description"}) - # vCPUs are refused: the VM would get them at its next start, past the quota counted now - response = self.post("resizevm_cpu", inst, {**form("resizevm_cpu"), "vcpu": "2"}) + # vCPUs are refused: the VM would get them at its next start, past the quota counted now; + # the page disables their fields while it runs, so this is a direct post of both + response = self.post("resizevm_cpu", inst, {**form("resizevm_cpu"), "vcpu": "2", "cur_vcpu": "1"}) self.assertIn("Shut off the VM to change its vCPUs", [str(m) for m in get_messages(response.wsgi_request)]) diff --git a/instances/views.py b/instances/views.py index 70df142e..c9d0d702 100755 --- a/instances/views.py +++ b/instances/views.py @@ -1271,7 +1271,7 @@ def resize_disk(request, pk): continue messages.success(request, _("Disk is resized: %(dev)s") % {"dev": disk["dev"]}) - return redirect(reverse("instances:instance", args=[instance.id]) + "#resize") + return redirect(reverse("instances:instance", args=[instance.id]) + "#resizevm_disk") @require_POST