Commit 8c20e023 authored by Francesc Guasch's avatar Francesc Guasch
Browse files

search for remaining test domains better

parent f450785b
......@@ -107,25 +107,6 @@ sub _remove_old_domains_vm {
}
for (reverse 0 .. 20 ) {
my $dom_name = base_domain_name()."_$_";
my $domain;
eval { $domain = $vm->search_domain($dom_name) };
next if !$domain;
eval { $domain->shutdown_now($USER_ADMIN); };
warn "Error shutdown $dom_name $@" if $@ && $@ !~ /No DB info/i;
eval {
$domain->remove( $USER_ADMIN );
};
if ( $@ && $@ =~ /No DB info/i ) {
eval { $domain->domain->undefine() if $domain->domain };
}
ok(!$@ , "Removing domain $dom_name ".ref($domain)
." expecting error='', got ='".($@ or '')."'") or exit;
}
}
sub _remove_old_domains_kvm {
......@@ -140,7 +121,7 @@ sub _remove_old_domains_kvm {
return if !$vm;
my $base_name = base_domain_name();
for my $domain ( $vm->vm->list_defined_domains ) {
for my $domain ( $vm->vm->list_all_domains ) {
next if $domain->get_name !~ /^$base_name/;
eval {
$domain->shutdown();
......
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