Skip to content

Commit

Permalink
Modify yast_dns_server test domain
Browse files Browse the repository at this point in the history
After recent changes for www.suse.com DNS round robin, it is not a
suitable domain for testing the dns server set-up of test scenario
yas2_cmd.
  • Loading branch information
sofiasyria committed Feb 22, 2021
1 parent 9770235 commit 9cf0a9e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/yast2_cmd/yast_dns_server.pm
Expand Up @@ -75,13 +75,13 @@ sub run {
assert_script_run(qq(sed -i 's/NETCONFIG_FORCE_REPLACE="no"/NETCONFIG_FORCE_REPLACE="yes"/' /etc/sysconfig/network/config));

#Forward server and test lookup
my $suseip = script_output("dig www.suse.com +short");
$suseip =~ s/.*(\d+\.\d+\.\d+\.\d+).*/$1/s;
my $opensuseip = script_output("dig www.opensuse.org +short");
$opensuseip =~ s/.*^(\d+\.\d+\.\d+\.\d+).*/$1/ms;
$self->cmd_handle("forwarders", "add", ip => "10.0.2.3");
#disable dnssec validation
assert_script_run("sed -i 's/#dnssec-validation auto/dnssec-validation no/' /etc/named.conf");
systemctl("start named.service");
validate_script_output('dig @localhost www.suse.com +short', sub { /\Q$suseip\E/ });
validate_script_output('dig @localhost www.opensuse.org +short', sub { /\Q$opensuseip\E/ });

assert_script_run("sed -i 's/dnssec-validation no/#dnssec-validation auto/' /etc/named.conf");
$self->cmd_handle("forwarders", "remove", ip => "10.0.2.3");
Expand Down

0 comments on commit 9cf0a9e

Please sign in to comment.