diff --git a/qubesadmin/tests/tools/qvm_volume.py b/qubesadmin/tests/tools/qvm_volume.py index a73f50ce..feefe5d8 100644 --- a/qubesadmin/tests/tools/qvm_volume.py +++ b/qubesadmin/tests/tools/qvm_volume.py @@ -496,17 +496,6 @@ def test_050_import_file(self): self.app.expected_calls[ ('testvm', 'admin.vm.volume.List', None, None)] = \ b'0\x00root\nprivate\n' - self.app.expected_calls[ - ('testvm', 'admin.vm.volume.Info', 'private', None)] = \ - b'0\x00pool=lvm\n' \ - b'vid=qubes_dom0/vm-testvm-private\n' \ - b'size=2147483648\n' \ - b'usage=10000000\n' \ - b'rw=True\n' \ - b'save_on_stop=True\n' \ - b'snap_on_start=False\n' \ - b'revisions_to_keep=0\n' \ - b'is_outdated=False\n' self.app.expected_calls[ ('testvm', 'admin.vm.volume.ImportWithSize', 'private', b'9\ntest-data')] = \ b'0\x00' @@ -526,17 +515,6 @@ def test_051_import_stdin(self): self.app.expected_calls[ ('testvm', 'admin.vm.volume.List', None, None)] = \ b'0\x00root\nprivate\n' - self.app.expected_calls[ - ('testvm', 'admin.vm.volume.Info', 'private', None)] = \ - b'0\x00pool=lvm\n' \ - b'vid=qubes_dom0/vm-testvm-private\n' \ - b'size=2147483648\n' \ - b'usage=10000000\n' \ - b'rw=True\n' \ - b'save_on_stop=True\n' \ - b'snap_on_start=False\n' \ - b'revisions_to_keep=0\n' \ - b'is_outdated=False\n' self.app.expected_calls[ ('testvm', 'admin.vm.volume.ImportWithSize', 'private', b'9\ntest-data')] = \ b'0\x00' @@ -557,17 +535,6 @@ def test_052_import_file_size(self): self.app.expected_calls[ ('testvm', 'admin.vm.volume.List', None, None)] = \ b'0\x00root\nprivate\n' - self.app.expected_calls[ - ('testvm', 'admin.vm.volume.Info', 'private', None)] = \ - b'0\x00pool=lvm\n' \ - b'vid=qubes_dom0/vm-testvm-private\n' \ - b'size=2147483648\n' \ - b'usage=10000000\n' \ - b'rw=True\n' \ - b'save_on_stop=True\n' \ - b'snap_on_start=False\n' \ - b'revisions_to_keep=0\n' \ - b'is_outdated=False\n' self.app.expected_calls[ ('testvm', 'admin.vm.volume.ImportWithSize', 'private', b'512\ntest-data')] = \ b'0\x00' @@ -587,17 +554,6 @@ def test_053_import_file_noresize(self): self.app.expected_calls[ ('testvm', 'admin.vm.volume.List', None, None)] = \ b'0\x00root\nprivate\n' - self.app.expected_calls[ - ('testvm', 'admin.vm.volume.Info', 'private', None)] = \ - b'0\x00pool=lvm\n' \ - b'vid=qubes_dom0/vm-testvm-private\n' \ - b'size=2147483648\n' \ - b'usage=10000000\n' \ - b'rw=True\n' \ - b'save_on_stop=True\n' \ - b'snap_on_start=False\n' \ - b'revisions_to_keep=0\n' \ - b'is_outdated=False\n' self.app.expected_calls[ ('testvm', 'admin.vm.volume.Import', 'private', b'test-data')] = \ b'0\x00' @@ -617,17 +573,6 @@ def test_053_import_file_matching_size(self): self.app.expected_calls[ ('testvm', 'admin.vm.volume.List', None, None)] = \ b'0\x00root\nprivate\n' - self.app.expected_calls[ - ('testvm', 'admin.vm.volume.Info', 'private', None)] = \ - b'0\x00pool=lvm\n' \ - b'vid=qubes_dom0/vm-testvm-private\n' \ - b'size=9\n' \ - b'usage=1\n' \ - b'rw=True\n' \ - b'save_on_stop=True\n' \ - b'snap_on_start=False\n' \ - b'revisions_to_keep=0\n' \ - b'is_outdated=False\n' self.app.expected_calls[ ('testvm', 'admin.vm.volume.ImportWithSize', 'private', b'9\ntest-data')] = \ b'0\x00' diff --git a/qubesadmin/tools/qvm_volume.py b/qubesadmin/tools/qvm_volume.py index 5ed77d10..ef10ab26 100644 --- a/qubesadmin/tools/qvm_volume.py +++ b/qubesadmin/tools/qvm_volume.py @@ -137,7 +137,6 @@ def import_volume(args): ''' Import a file into volume ''' volume = args.volume - old_size = volume.size input_path = args.input_path if input_path == '-': input_file = sys.stdin.buffer