]>
git.proxmox.com Git - pve-manager.git/blob - test/replication_test4.pl
3 # Note: Test replication job failure
9 use lib
('.', '../..');
12 use ReplicationTestEnv
;
16 $ReplicationTestEnv::mocked_nodename
= 'node1';
18 my $pve_replication_module = Test
::MockModule-
>new('PVE::Replication');
19 $pve_replication_module->mock(
20 replicate
=> sub { die "faked replication error\n"; });
28 $ReplicationTestEnv::mocked_replication_jobs
= {
36 'target' => 'node1', # local node, job should be skipped
41 $ReplicationTestEnv::mocked_vm_configs
= {
45 ide0
=> 'local-lvm:vm-900-disk-1,size=4G',
47 ide2
=> 'none,media=cdrom',
51 ReplicationTestEnv
::setup
();
57 ReplicationTestEnv
::openlog
();
59 for (my $i = 0; $i < 120; $i++) {
60 ReplicationTestEnv
::track_jobs
($ctime);
64 ReplicationTestEnv
::commit_log
();