Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
use strict;
use warnings;
+
+use Test::MockModule;
+
use PVE::Tools qw(run_command);
use lib qw(..);
print "TEST $testdir => OK\n";
}
+my $cluster_module = Test::MockModule->new("PVE::Cluster");
+$cluster_module->mock(
+ cfs_read_file => sub {
+ my ($filename) = @_;
+ return {} if $filename eq 'datacenter.cfg';
+ die "illegal access to pmxcfs in test!\n";
+ },
+ cfs_write_file => sub {
+ die "illegal access to pmxcfs in test!\n";
+ },
+ cfs_lock_file => sub {
+ die "illegal access to pmxcfs in test!\n";
+ },
+);
+
if (scalar(@ARGV)) {
foreach my $testdir (@ARGV) {