Skip to content

Commit

Permalink
Remove workarounds in yast2 nis mm tests
Browse files Browse the repository at this point in the history
Remove xml files for ypbind/serv firewall hack
  • Loading branch information
JRivrain committed May 7, 2020
1 parent 2aa31e8 commit b17c0da
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 47 deletions.
9 changes: 0 additions & 9 deletions data/x11/workaround_ypbind.xml

This file was deleted.

9 changes: 0 additions & 9 deletions data/x11/workaround_ypserv.xml

This file was deleted.

15 changes: 2 additions & 13 deletions tests/x11/nis_client.pm
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ sub setup_nis_client {
assert_screen 'nis-client-configuration', 120;
send_key 'alt-u'; # use NIS radio button
wait_still_screen 4;
send_key 'alt-l'; # open firewall port
assert_screen 'nis-client-fw-opened';
send_key 'alt-i'; # NIS domain
type_string $setup_nis_nfs_x11{nis_domain};
send_key 'alt-m'; # start automounter
Expand Down Expand Up @@ -61,8 +59,6 @@ sub nfs_settings_tab {
assert_screen 'nis-client-nfs-settings-tab';
send_key 'alt-v'; # nfsv4 domain name field
type_string $setup_nis_nfs_x11{nfs_domain};
send_key 'alt-f'; # open firewall port
assert_screen 'nis-client-nfs-settings-tab-opened-fw';
wait_still_screen 4, 4; # blinking cursor
save_screenshot;
}
Expand Down Expand Up @@ -96,7 +92,7 @@ sub nfs_shares_tab {
send_key 'alt-o'; # OK
assert_screen 'nis-client-nfs-client-configuration';
send_key 'alt-o'; # OK
assert_screen 'nis-client-fw-opened';
assert_screen 'nis-client-configuration';
send_key 'alt-f'; # finish
if (is_opensuse) {
assert_screen 'disable_auto_login_popup';
Expand All @@ -122,15 +118,8 @@ sub run {
setup_static_mm_network($setup_nis_nfs_x11{client_address});
zypper_call 'in yast2-nis-server';

if ($self->firewall eq 'firewalld') {
# Workaround for bsc#1083486, reported by server module
my $firewalld_ypbind_service = get_test_data('x11/workaround_ypbind.xml');
type_string("echo \"$firewalld_ypbind_service\" > /usr/lib/firewalld/services/ypbind.xml\n");
assert_script_run('firewall-cmd --reload');
}

# we have to stop the firewall, see bsc#999873 and bsc#1083487#c36
systemctl 'stop ' . $self->firewall;
record_soft_failure('bsc#999873');

mutex_lock('nis_ready'); # wait for NIS server setup
my $module_name = y2_module_consoletest::yast2_console_exec(yast2_module => 'nis');
Expand Down
18 changes: 2 additions & 16 deletions tests/x11/nis_server.pm
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ sub nis_server_configuration {
send_key 'tab'; # jump to NIS domain name
type_string $setup_nis_nfs_x11{nis_domain};
assert_screen 'nis-server-master-server-setup-nis-domain';
assert_and_click('nis-server-fw-selected'); # open firewall port
assert_screen 'nis-master-server-tab-opened-fw';
wait_screen_change { send_key 'alt-a' };
# unselect active slave NIS server exists checkbox
assert_screen 'nis-master-server-setup-finished';
Expand Down Expand Up @@ -85,8 +83,7 @@ sub nfs_server_configuration {
# NFS Server Configuration
assert_screen 'nfs-server-configuration';
send_key 'alt-f'; # open port in firewall
assert_screen 'nfs-server-configuration-opened-fw';
wait_screen_change { send_key 'alt-s' }; # start nfs server
send_key 'alt-s'; # start nfs server
send_key 'alt-m'; # NFSv4 domain name field
type_string $setup_nis_nfs_x11{nfs_domain};
assert_screen 'nfs-server-configuration-nfsv4-domain';
Expand Down Expand Up @@ -122,20 +119,9 @@ sub run {
become_root;
setup_static_mm_network($setup_nis_nfs_x11{server_address});
zypper_call 'in yast2-nis-server yast2-nfs-server';
# Workarounds:
# Yast2 does not open ports for SuseFirewall2 (bsc#999873)
# Missing firewalld service files for NFS/NIS -> lack of support for RPC (bsc#1083486)
if ($self->firewall eq 'firewalld') {
record_soft_failure('bsc#1083486');
my $firewalld_ypserv_service = get_test_data('x11/workaround_ypserv.xml');
type_string("echo \"$firewalld_ypserv_service\" > /usr/lib/firewalld/services/ypserv.xml\n");
my $firewalld_nfs_service = get_test_data('x11/workaround_nfs-kernel-server.xml');
type_string("echo \"$firewalld_nfs_service\" > /usr/lib/firewalld/services/nfs-kernel-server.xml\n");
assert_script_run('firewall-cmd --reload', fail_message => "Firewalld reload failed!");
}

# we have to stop the firewall, see bsc#999873 and bsc#1083487#c36
systemctl 'stop ' . $self->firewall;
record_soft_failure('bsc#999873');

my $module_name = y2_module_consoletest::yast2_console_exec(yast2_module => 'nis_server');
nis_server_configuration();
Expand Down

0 comments on commit b17c0da

Please sign in to comment.