]> git.proxmox.com Git - pve-container.git/blobdiff - src/test/snapshot-test.pm
snapshot-test.pm: ignore existing replication config
[pve-container.git] / src / test / snapshot-test.pm
index 95f34987fdc8fb0aa19df751f003e7e2ed0f4d89..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;
@@ -241,7 +242,7 @@ sub mocked_load_config {
 
     my $raw = PVE::Tools::file_get_contents($filename);
 
-    my $conf = PVE::LXC::parse_pct_config($filename, $raw);
+    my $conf = PVE::LXC::Config::parse_pct_config($filename, $raw);
     return $conf;
 }
 
@@ -257,7 +258,7 @@ sub mocked_write_config {
        }
     }
 
-    my $raw = PVE::LXC::write_pct_config($filename, $conf);
+    my $raw = PVE::LXC::Config::write_pct_config($filename, $conf);
 
     PVE::Tools::file_set_contents($filename, $raw);
 }
@@ -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;