Commit e030d86b authored by Francesc Guasch's avatar Francesc Guasch
Browse files

refactor(tests): fixed some tests need root

parent 2a91326b
......@@ -2098,6 +2098,7 @@ sub _check_leftovers_users {
}
sub _check_iptables() {
return if $>;
for my $table ( 'mangle', 'nat') {
my @cmd = ("iptables" ,"-t", $table,"-L","POSTROUTING");
my ($in, $out, $err);
......
......@@ -324,6 +324,7 @@ sub _clone_and_base($vm_name, $t, $base0) {
my $base1 = $base0;
if ($vm_name eq 'KVM') {
my $base = rvd_front->search_domain($BASE_NAME);
die "Error: test base $BASE_NAME not found" if !$base;
my $name = new_domain_name()."-".$vm_name."-$$";
mojo_request_url_post($t,"/machine/copy",{id_base => $base->id, new_name => $name, copy_ram => 0.128, copy_number => 1});
$base1 = rvd_front->search_domain($name);
......
......@@ -787,7 +787,7 @@ for my $vm_name ( vm_names()) {
diag("Skipping VM $vm_name in this system");
next;
}
_download_alpine64();
_download_alpine64() if !$<;
$TLS = 0;
$TLS = 1 if check_libvirt_tls() && $vm_name eq 'KVM';
$BASE = _create_base($vm);
......
Markdown is supported
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