diff --git a/test/ReplicationTestEnv.pm b/test/ReplicationTestEnv.pm index b45e5c80..e92fba18 100755 --- a/test/ReplicationTestEnv.pm +++ b/test/ReplicationTestEnv.pm @@ -2,24 +2,23 @@ package ReplicationTestEnv; use strict; use warnings; -use JSON; + use Clone 'clone'; use File::Basename; +use JSON; use lib ('.', '../..'); -use Data::Dumper; - -use PVE::INotify; use PVE::Cluster; +use PVE::INotify; +use PVE::LXC::Config; +use PVE::QemuConfig; use PVE::Storage; -use PVE::ReplicationConfig; -use PVE::ReplicationState; + use PVE::API2::Replication; use PVE::Replication; -use PVE::QemuConfig; -use PVE::LXC::Config; - +use PVE::ReplicationConfig; +use PVE::ReplicationState; use Test::MockModule; diff --git a/test/replication_test1.pl b/test/replication_test1.pl index 0dfcf05a..7a31cfc3 100755 --- a/test/replication_test1.pl +++ b/test/replication_test1.pl @@ -4,12 +4,11 @@ use strict; use warnings; + use JSON; use lib ('.', '../..'); -use Data::Dumper; - use ReplicationTestEnv; use Test::More tests => 3; diff --git a/test/replication_test2.pl b/test/replication_test2.pl index f49572a0..ff5fbaff 100755 --- a/test/replication_test2.pl +++ b/test/replication_test2.pl @@ -8,12 +8,10 @@ use JSON; use lib ('.', '../..'); -use Data::Dumper; - use Test::MockModule; -use ReplicationTestEnv; use Test::More tests => 1; +use ReplicationTestEnv; use PVE::API2::Replication; $ReplicationTestEnv::mocked_nodename = 'node1'; @@ -65,8 +63,6 @@ for (my $i = 0; $i < 61; $i++) { PVE::API2::Replication::run_jobs($i*60); } -#print Dumper($schedule); - my $exptected_schedule = [ { last_sync => 0, diff --git a/test/replication_test3.pl b/test/replication_test3.pl index d6b1f31f..54004c70 100755 --- a/test/replication_test3.pl +++ b/test/replication_test3.pl @@ -4,18 +4,17 @@ use strict; use warnings; + use JSON; use lib ('.', '../..'); -use Data::Dumper; - use Test::MockModule; +use Test::More; + use ReplicationTestEnv; use PVE::API2::Replication; -use Test::More; - $ReplicationTestEnv::mocked_nodename = 'node1'; my $testjob = { diff --git a/test/replication_test4.pl b/test/replication_test4.pl index 2a8b339b..38fef0e3 100755 --- a/test/replication_test4.pl +++ b/test/replication_test4.pl @@ -8,8 +8,6 @@ use JSON; use lib ('.', '../..'); -use Data::Dumper; - use Test::MockModule; use ReplicationTestEnv; diff --git a/test/replication_test5.pl b/test/replication_test5.pl index 73d1e2d0..b884881e 100755 --- a/test/replication_test5.pl +++ b/test/replication_test5.pl @@ -12,8 +12,6 @@ use JSON; use lib ('.', '../..'); -use Data::Dumper; - use Test::MockModule; use ReplicationTestEnv; diff --git a/test/replication_test6.pl b/test/replication_test6.pl index 6062a2bb..5b2303b5 100755 --- a/test/replication_test6.pl +++ b/test/replication_test6.pl @@ -8,8 +8,6 @@ use JSON; use lib ('.', '../..'); -use Data::Dumper; - use Test::MockModule; use ReplicationTestEnv;