Commit 6ebd26c5 authored by Francesc Guasch's avatar Francesc Guasch
Browse files

test(backend): remove corrupt volumes

issue #1090
parent 71946bd2
......@@ -55,6 +55,30 @@ sub test_remove_domain_by_name {
}
sub test_remove_corrupt_clone {
my $vm = shift;
my $base = create_domain($vm);
$base->add_volume_swap();
my $clone = $base->clone(
name => new_domain_name
,user => user_admin
);
for my $file ( $clone->list_disks ) {
warn $file;
open my $out, '>',$file or die "$! $file";
print $out "bogus\n";
close $out;
}
eval { $clone->start(user_admin) };
diag($@);
$clone->shutdown_now(user_admin);
$clone->remove(user_admin);
$base->remove(user_admin);
}
sub search_domain_db
{
my $name = shift;
......@@ -116,7 +140,6 @@ sub test_new_domain_iso {
$domain = $RAVADA->create_domain(name => $name, id_iso => search_id_iso('alpine')
, active => $active
, id_owner => $USER->id , iso_file => $iso->{device}
, disk => 1024 * 1024
, vm => $BACKEND
);
};
......@@ -306,6 +329,7 @@ test_vm_kvm();
remove_old_domains();
remove_old_disks();
test_domain();
test_remove_corrupt_clone($vm);
test_domain_with_iso();
test_domain_missing_in_db();
test_domain_inactive();
......
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