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