test: mock PVE::ReplicationConfig->new

to allow tests to finish without running, functional pmxcfs instance.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler 2019-11-06 13:36:54 +01:00 committed by Thomas Lamprecht
parent 425441e6fa
commit 9bfca2ca13

View File

@ -379,6 +379,7 @@ $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('new' => sub { return bless {}, "PVE::ReplicationConfig" });
$repl_config_module->mock('check_for_existing_jobs' => sub { return undef });
$running = 1;