]> git.proxmox.com Git - pve-container.git/commitdiff
snapshot-test.pm: ignore existing replication config
authorDietmar Maurer <dietmar@proxmox.com>
Wed, 28 Jun 2017 11:23:28 +0000 (13:23 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 28 Jun 2017 11:24:03 +0000 (13:24 +0200)
src/test/snapshot-test.pm

index c9f9b7160c1792cf7f3465263054ba29df29abb8..6f0b209eaba8dc4a9dc4fcec948d1b26db2c25bd 100644 (file)
@@ -10,6 +10,7 @@ use PVE::Storage::Plugin;
 use PVE::LXC;
 use PVE::LXC::Config;
 use PVE::Tools;
+use PVE::ReplicationConfig;
 
 use Test::MockModule;
 use Test::More;
@@ -281,6 +282,10 @@ $lxc_config_module->mock('load_config', \&mocked_load_config);
 $lxc_config_module->mock('write_config', \&mocked_write_config);
 $lxc_config_module->mock('has_feature', \&mocked_has_feature);
 
+# 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;