Skip to content

Commit

Permalink
Merge pull request #20215 from DimStar77/poo165449
Browse files Browse the repository at this point in the history
autofs_client: ensure autofs is installed prior to testing it
  • Loading branch information
DimStar77 authored Sep 25, 2024
2 parents 66760d4 + d53a280 commit bffa5fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/autofs_utils.pm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use strict;
use warnings;
use testapi;
use utils qw(zypper_call common_service_action);
use version_utils qw(is_sle is_jeos);
use version_utils qw(is_sle is_jeos is_tumbleweed);

our @EXPORT = qw(setup_autofs_server check_autofs_service
install_service enable_service start_service
Expand Down Expand Up @@ -128,7 +128,7 @@ sub configure_service {
my $mk_iso_tool = (is_jeos and is_sle('<15')) ? 'genisoimage' : 'mkisofs';

if ($stage eq 'function') {
zypper_call("in autofs $mk_iso_tool") if (is_sle('15+') or is_jeos);
zypper_call("in autofs $mk_iso_tool") if (is_sle('15+') or is_jeos or is_tumbleweed);
}
assert_script_run("mkdir -p ${test_mount_dir}");
assert_script_run("chmod 0777 ${test_mount_dir}");
Expand Down
3 changes: 2 additions & 1 deletion tests/network/autofs_client.pm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
use base 'consoletest';
use testapi;
use lockapi;
use autofs_utils qw(setup_autofs_server check_autofs_service);
use autofs_utils qw(setup_autofs_server check_autofs_service install_service);
use utils qw(systemctl script_retry);
use version_utils qw(is_leap is_sle);
use strict;
Expand All @@ -59,6 +59,7 @@ sub run {
my $test_conf_file_content = "test -ro $nfs_server:$remote_mount";

# autofs
install_service();
check_autofs_service();
setup_autofs_server(autofs_conf_file => $autofs_conf_file, autofs_map_file => $autofs_map_file, test_conf_file => $test_conf_file, test_conf_file_content => $test_conf_file_content, test_mount_dir => $test_mount_dir);
systemctl 'restart autofs';
Expand Down

0 comments on commit bffa5fe

Please sign in to comment.