Commit 7c5b1eb0 authored by Francesc Guasch's avatar Francesc Guasch
Browse files

Merge branch 'master' of https://github.com/UPC/ravada

parents fa474569 bf5f9a59
......@@ -59,7 +59,7 @@ sub test_remove_corrupt_clone {
my $vm = shift;
my $base = create_domain($vm);
$base->add_volume_swap();
$base->add_volume_swap( size => 1024 * 1024 );
my $clone = $base->clone(
name => new_domain_name
,user => user_admin
......@@ -141,6 +141,7 @@ sub test_new_domain_iso {
, active => $active
, id_owner => $USER->id , iso_file => $iso->{device}
, vm => $BACKEND
, disk => 1024 * 1024
);
};
is($@,'') or return;
......
......@@ -220,7 +220,7 @@ sub _create_2_clones_same_port($vm, $node, $base, $ip_local, $ip_remote) {
$clone_local->start(user => user_admin, remote_ip => $ip_local);
$clone_remote->start(user => user_admin, remote_ip => $ip_remote);
for (1 .. 10 ) {
for (1 .. 100 ) {
my ($port_local) = $clone_local->display(user_admin) =~ m{://.*:(\d+)};
my ($port_remote) = $clone_remote->display(user_admin) =~ m{://.*:(\d+)};
......
......@@ -67,7 +67,7 @@ sub test_list_bridges($vm) {
is($req->status,'done');
is($req->error,'');
my @exp_bridges = _expected_bridges($vm);
my @exp_bridges = sort(_expected_bridges($vm));
is($req->output,encode_json(\@exp_bridges));
my $bridges = rvd_front->list_network_interfaces(
......@@ -79,19 +79,17 @@ sub test_list_bridges($vm) {
SKIP: {
skip("No system bridges found",1) if !scalar @exp_bridges;
like($req->output, qr/\["\w+"]/);
like($req->output, qr/\["[\w\d]+".*\]/);
}
}
sub _expected_bridges($vm) {
my $brctl = `which brctl`;
chomp $brctl;
return if !$brctl;
return undef if !$brctl;
my @exp_bridges = grep { defined $_ && $_ ne 'bridge' }
map { /(^\w+)\s*/; $1 }
split /\n/,`brctl show`;
@exp_bridges = _remove_qemu_bridges($vm, \@exp_bridges);
return @exp_bridges;
......
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