diff --git a/t/kvm/20_domain_kvm.t b/t/kvm/20_domain_kvm.t index 1d1f6294d..9fe05c76e 100644 --- a/t/kvm/20_domain_kvm.t +++ b/t/kvm/20_domain_kvm.t @@ -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; diff --git a/t/nodes/10_basic.t b/t/nodes/10_basic.t index dcbffa11c..9c345c0bc 100644 --- a/t/nodes/10_basic.t +++ b/t/nodes/10_basic.t @@ -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+)}; diff --git a/t/request/70_network.t b/t/request/70_network.t index ee2975ef2..df740bb07 100644 --- a/t/request/70_network.t +++ b/t/request/70_network.t @@ -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;