snapshot-test.pm: ignore existing replication config

This commit is contained in:
Dietmar Maurer 2017-06-28 13:28:41 +02:00
parent 85909c04c4
commit d79a3e5411

View 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;