Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/UPC/ravada
Browse files Browse the repository at this point in the history
  • Loading branch information
frankiejol committed Jun 3, 2019
2 parents fa47456 + bf5f9a5 commit 7c5b1eb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
3 changes: 2 additions & 1 deletion t/kvm/20_domain_kvm.t
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion t/nodes/10_basic.t
Original file line number Diff line number Diff line change
Expand Up @@ -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+)};

Expand Down
8 changes: 3 additions & 5 deletions t/request/70_network.t
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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;
Expand Down

0 comments on commit 7c5b1eb

Please sign in to comment.