]> git.proxmox.com Git - qemu-server.git/blobdiff - test/snapshot-test.pm
snapshot-test: mock query-savevm better
[qemu-server.git] / test / snapshot-test.pm
index cd007250c3f0144b3d998f132ef94c0e0acfd622..f65a902c819e74f574815fa59592f9ca33a07eeb 100644 (file)
@@ -1,4 +1,4 @@
-package PVE::QemuServer;
+package PVE::QemuServer; ## no critic
 
 use strict;
 use warnings;
@@ -342,7 +342,11 @@ sub qmp_cmd {
        return;
     }
     if ($exec eq "query-savevm") {
-       return { "status" => "completed" };
+       return {
+           "status" => "completed",
+           "bytes" => 1024*1024*1024,
+           "total-time" => 5000,
+        };
     }
     die "unexpected vm_qmp_command!\n";
 }
@@ -638,3 +642,5 @@ printf("Successful snapshot_rollback with saved vmstate and machine config and r
 testcase_rollback("302", "test", "", { "local:snapshotable-disk-1" => "test" });
 
 done_testing();
+
+1;