Commit b3e1acf7 authored by Francesc Guasch's avatar Francesc Guasch
Browse files

Merge branch 'hotfix/0.4.1'

parents 71946bd2 179b4915
......@@ -1236,6 +1236,8 @@ sub _upgrade_tables {
$self->_upgrade_table('grant_types','enabled','int not null default 1');
$self->_upgrade_table('vms','mac','char(18)');
$self->_upgrade_table('volumes','name','char(200)');
}
......
......@@ -1652,7 +1652,7 @@ sub _find_base {
run3(\@cmd,\$in, \$out, \$err);
my ($base) = $out =~ m{^backing file: (.*)}mi;
confess "No base for $file in $out" if !$base;
warn "No base for $file in $out" if !$base;
return $base;
}
......
......@@ -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