]> git.proxmox.com Git - qemu-server.git/commitdiff
snapshot-test.pm: ignore existing replication config
authorDietmar Maurer <dietmar@proxmox.com>
Wed, 28 Jun 2017 11:28:41 +0000 (13:28 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 28 Jun 2017 11:29:33 +0000 (13:29 +0200)
test/snapshot-test.pm

index 5620d0106803661f017bec10bc218f9c1c0eeec1..d95d77f1b6882f06a6339f20fc277fc16f5fe542 100644 (file)
@@ -10,6 +10,7 @@ use PVE::Storage::Plugin;
 use PVE::QemuServer;
 use PVE::QemuConfig;
 use PVE::Tools;
+use PVE::ReplicationConfig;
 
 use Test::MockModule;
 use Test::More;
@@ -376,6 +377,10 @@ $qemu_config_module->mock('write_config', \&write_config);
 $qemu_config_module->mock('has_feature', \&has_feature);
 $qemu_config_module->mock('__snapshot_save_vmstate', \&__snapshot_save_vmstate);
 
+# ignore existing replication config
+my $repl_config_module = new Test::MockModule('PVE::ReplicationConfig');
+$repl_config_module->mock('check_for_existing_jobs' => sub { return undef });
+
 $running = 1;
 $freeze_possible = 1;
 $save_vmstate_works = 1;