URL: https://github.com/freeipa/freeipa/pull/5009 Author: kaleemsiddiqu Title: #5009: [Backport][ipa-4-8] Tests for fake_mname parameter setup Action: opened
PR body: """ fake_mname can be set through dnsserver-mod's --soa-mname-override option which was not doable through same parameter setup in /etc/named.conf https://bugzilla.redhat.com/show_bug.cgi?id=1488732 Signed-off-by: Kaleemullah Siddiqui <ksidd...@redhat.com> Reviewed-By: Alexander Bokovoy <aboko...@redhat.com> Reviewed-By: Florence Blanc-Renaud <f...@redhat.com> Signed-off-by: Kaleemullah Siddiqui <ksidd...@redhat.com> """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/5009/head:pr5009 git checkout pr5009
From d30008bee1790be7ceb5e2dfa6ceae42a8d87093 Mon Sep 17 00:00:00 2001 From: Kaleemullah Siddiqui <ksidd...@redhat.com> Date: Tue, 4 Aug 2020 16:49:22 +0530 Subject: [PATCH] Tests for fake_mname parameter setup fake_mname can be set through dnsserver-mod's --soa-mname-override option which was not doable through same parameter setup in /etc/named.conf https://bugzilla.redhat.com/show_bug.cgi?id=1488732 Signed-off-by: Kaleemullah Siddiqui <ksidd...@redhat.com> Reviewed-By: Alexander Bokovoy <aboko...@redhat.com> Reviewed-By: Florence Blanc-Renaud <f...@redhat.com> Signed-off-by: Kaleemullah Siddiqui <ksidd...@redhat.com> --- .../nightly_ipa-4-8_latest.yaml | 12 ++++++ .../nightly_ipa-4-8_previous.yaml | 12 ++++++ ipatests/test_integration/test_dns.py | 40 +++++++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 ipatests/test_integration/test_dns.py diff --git a/ipatests/prci_definitions/nightly_ipa-4-8_latest.yaml b/ipatests/prci_definitions/nightly_ipa-4-8_latest.yaml index e801da6663..91169439b9 100644 --- a/ipatests/prci_definitions/nightly_ipa-4-8_latest.yaml +++ b/ipatests/prci_definitions/nightly_ipa-4-8_latest.yaml @@ -1592,3 +1592,15 @@ jobs: template: *ci-ipa-4-8-latest timeout: 7200 topology: *master_3client + + fedora-latest-ipa-4-8/test_dns: + requires: [fedora-latest-ipa-4-8/build] + priority: 50 + job: + class: RunPytest + args: + build_url: '{fedora-latest-ipa-4-8/build_url}' + test_suite: test_integration/test_dns.py + template: *ci-ipa-4-8-latest + timeout: 3600 + topology: *master_1repl diff --git a/ipatests/prci_definitions/nightly_ipa-4-8_previous.yaml b/ipatests/prci_definitions/nightly_ipa-4-8_previous.yaml index b2e3aead5c..72db913dff 100644 --- a/ipatests/prci_definitions/nightly_ipa-4-8_previous.yaml +++ b/ipatests/prci_definitions/nightly_ipa-4-8_previous.yaml @@ -1593,3 +1593,15 @@ jobs: template: *ci-ipa-4-8-previous timeout: 7200 topology: *master_3client + + fedora-previous-ipa-4-8/test_dns: + requires: [fedora-previous-ipa-4-8/build] + priority: 50 + job: + class: RunPytest + args: + build_url: '{fedora-previous-ipa-4-8/build_url}' + test_suite: test_integration/test_dns.py + template: *ci-ipa-4-8-previous + timeout: 3600 + topology: *master_1repl diff --git a/ipatests/test_integration/test_dns.py b/ipatests/test_integration/test_dns.py new file mode 100644 index 0000000000..1cef22525b --- /dev/null +++ b/ipatests/test_integration/test_dns.py @@ -0,0 +1,40 @@ +# +# Copyright (C) 2020 FreeIPA Contributors see COPYING for license +# +"""This covers tests for dns related feature""" + +from __future__ import absolute_import + +from ipatests.pytest_ipa.integration import tasks +from ipatests.test_integration.base import IntegrationTest + + +class TestDNS(IntegrationTest): + """Tests for DNS feature. + + This test class covers the tests for DNS feature. + """ + topology = 'line' + num_replicas = 0 + + def test_fake_mname_param(self): + """Test that fake_mname param is set using dnsserver-mod option. + + Test for BZ 1488732 which checks that --soa-mname-override option + from dnsserver-mod sets the fake_mname. + """ + tasks.kinit_admin(self.master) + self.master.run_command(['ipa', 'dnsserver-mod', self.master.hostname, + '--soa-mname-override', 'fake']) + tasks.restart_named(self.master) + cmd = self.master.run_command(['dig', '+short', '-t', 'SOA', + self.master.domain.name]) + assert 'fake' in cmd.stdout_text + + # reverting the fake_mname change to check it is reverted correctly + self.master.run_command(['ipa', 'dnsserver-mod', self.master.hostname, + '--soa-mname-override', '']) + tasks.restart_named(self.master) + cmd = self.master.run_command(['dig', '+short', '-t', 'SOA', + self.master.domain.name]) + assert 'fake' not in cmd.stdout_text
_______________________________________________ FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/freeipa-devel@lists.fedorahosted.org