Commit 63a09752 authored by Francesc Guasch's avatar Francesc Guasch
Browse files

fixed test request base with only void VM

parent b47b10c9
......@@ -261,9 +261,14 @@ sub create_domain {
my $request = $args{request} if $args{request};
my $vm;
$vm = $self->search_vm($vm_name) if $vm_name;
if ($vm_name) {
$vm = $self->search_vm($vm_name);
confess "ERROR: vm $vm_name not found" if !$vm;
}
$vm = $self->vm->[0] if !$vm;
confess "No vm found" if !$vm;
carp "WARNING: no VM defined, we will use ".$vm->name
if !$vm_name;
......
......@@ -107,6 +107,7 @@ sub test_message_new_domain {
}
sub test_req_create_domain {
my $vm_name = shift;
my $name = new_domain_name();
......@@ -337,8 +338,8 @@ sub test_req_remove_base {
.", got : '".$req->error."'");
{
my $domain_base = rvd_front->search_vm('KVM')->search_domain($name_base);
ok(!$domain_base->is_base());
my $domain_base = rvd_front->search_vm($vm_name)->search_domain($name_base);
ok(!$domain_base->is_base(),"Expecting $name_base is not base");
}
check_files_removed(@files_base);
}
......@@ -355,17 +356,17 @@ ok($Ravada::CONNECTOR,"Expecting conector, got ".($Ravada::CONNECTOR or '<unde>'
remove_old_domains();
remove_old_disks();
for my $vm_name ( qw(KVM)) {
for my $vm_name ( qw(Void KVM)) {
my $vm_connected;
eval {
my $rvd_back = rvd_back();
my $vm= $rvd_back->search_vm($vm_name) if rvd_back();
$vm_connected = 1;
@ARG_CREATE_DOM = ( id_iso => 1, vm => $vm_name, id_owner => $USER->id ) if $vm;
$vm_connected = 1 if $vm;
@ARG_CREATE_DOM = ( id_iso => 1, vm => $vm_name, id_owner => $USER->id );
};
SKIP: {
my $msg = "SKIPPED: No virtual managers found";
my $msg = "SKIPPED: virtual manager $vm_name not found";
skip($msg,10) if !$vm_connected;
diag("Testing requests with $vm_name");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment