]>
git.proxmox.com Git - pve-manager.git/blob - test/replication_test1.pl
3 # Note: Test if mockup from ReplicationTestEnv works
9 use lib
('.', '../..');
13 use ReplicationTestEnv
;
14 use Test
::More tests
=> 3;
16 $ReplicationTestEnv::mocked_nodename
= 'node1';
24 $ReplicationTestEnv::mocked_replication_jobs
= {
25 job_900_to_node1
=> $testjob,
28 $ReplicationTestEnv::mocked_vm_configs
= {
32 ide0
=> 'local-lvm:vm-900-disk-1,size=4G',
34 ide2
=> 'none,media=cdrom',
38 ReplicationTestEnv
::setup
();
40 ok
(PVE
::INotify
::nodename
() eq 'node1');
42 my $list = PVE
::Cluster
::get_vmlist
();
43 is_deeply
($list, { ids
=> {900 => { node
=> 'node1', type
=> 'qemu', version
=> 1}}});
44 my $cfg = PVE
::ReplicationConfig-
>new();
45 is_deeply
($cfg, { ids
=> { job_900_to_node1
=> $testjob }});