sub assert_config_exists_on_node {
my ($vmid, $node) = @_;
- return -f cfs_config_path(undef, $vmid, $node);
+ return -f cfs_config_path("PVE::QemuConfig", $vmid, $node);
}
# END mocked PVE::QemuConfig methods
# BEGIN mocked PVE::QemuServer::Monitor methods
sub qmp_cmd {
- my ($vmid, $cmd, $nocheck) = @_;
+ my ($vmid, $cmd) = @_;
my $exec = $cmd->{execute};
if ($exec eq "delete-drive-snapshot") {
}
sub vm_start {
- my ($storecfg, $vmid, $statefile, $skiplock, $migratedfrom, $paused, $forcemachine) = @_;
+ my ($storecfg, $vmid, $params, $migrate_opts) = @_;
die "Storage config not mocked! aborting\n"
if defined($storecfg);
die "statefile and forcemachine must be both defined or undefined! aborting\n"
- if defined($statefile) xor defined($forcemachine);
+ if defined($params->{statefile}) xor defined($params->{forcemachine});
return;
}
# ignore existing replication config
my $repl_config_module = new Test::MockModule('PVE::ReplicationConfig');
$repl_config_module->mock('new' => sub { return bless {}, "PVE::ReplicationConfig" });
-$repl_config_module->mock('check_for_existing_jobs' => sub { return undef });
+$repl_config_module->mock('check_for_existing_jobs' => sub { return });
my $storage_module = new Test::MockModule('PVE::Storage');
-$storage_module->mock('config', sub { return undef; });
+$storage_module->mock('config', sub { return; });
$storage_module->mock('path', sub { return "/some/store/statefile/path"; });
$storage_module->mock('activate_volumes', \&mocked_activate_volumes);
$storage_module->mock('deactivate_volumes', \&mocked_deactivate_volumes);