Commit 2c2616b6 authored by Francesc Guasch's avatar Francesc Guasch
Browse files

refactor(test): updated to work with latest requests

parent 2d72ea08
......@@ -1085,20 +1085,23 @@ sub test_fill_memory($vm, $node, $migrate) {
my $clone = rvd_back->search_domain($clone_name) or last;
ok($clone,"Expecting clone $clone_name") or exit;
$clone->migrate($node) if $migrate;
wait_request(debug => 0);
eval { $clone->start(user_admin) };
$error = $@;
like($error, qr/(^$|No free memory)/);
exit if $error && $error !~ /No free memory/;
last if $error;
$nodes{$clone->_vm->name}++;
my $clone_2 = Ravada::Domain->open($clone->id);
$nodes{$clone_2->_vm->name}++;
last if $migrate && exists $nodes{$vm->name} && $nodes{$vm->name} > 2;
if (keys(%nodes) > 1) {
if (scalar keys(%nodes) > 0) {
$memory = int($memory*1.5);
}
}
ok(exists $nodes{$vm->name},"Expecting some clones to node ".$vm->name." ".$vm->id);
ok(exists $nodes{$node->name},"Expecting some clones to node ".$node->name." ".$node->id);
ok(exists $nodes{$node->name},"Expecting some clones to node ".$node->name." ".$node->id) or exit;
_remove_clones($base);
}
......
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