From 48624412e826838f318d6c3e8e2a09cd1874c89d Mon Sep 17 00:00:00 2001 From: Jan Vcelak <jan.vcelak@nic.cz> Date: Sat, 12 Apr 2014 16:36:54 +0200 Subject: [PATCH] tests: use socket.gethostname() instead of socket.getfqdn() No reasoning behind this change, except that it seems to work more reliably. On my machine getfqdn() returns 'localhost.localdomain', while Knot detects correct system canonical name. On distel, both functions return the same result. --- tests-extra/tests/chaos/ident/test.py | 2 +- tests-extra/tests/edns/nsid/test.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests-extra/tests/chaos/ident/test.py b/tests-extra/tests/chaos/ident/test.py index 656b934cb..7ec288e91 100644 --- a/tests-extra/tests/chaos/ident/test.py +++ b/tests-extra/tests/chaos/ident/test.py @@ -25,7 +25,7 @@ resp.check('"' + name + '"') # 2) FQDN hostname. resp = server2.dig("id.server", "TXT", "CH") -resp.check(socket.getfqdn()) +resp.check(socket.gethostname()) # 3) Explicitly disabled. resp = server3.dig("id.server", "TXT", "CH") diff --git a/tests-extra/tests/edns/nsid/test.py b/tests-extra/tests/edns/nsid/test.py index 355ee4f37..d55b37dfc 100644 --- a/tests-extra/tests/edns/nsid/test.py +++ b/tests-extra/tests/edns/nsid/test.py @@ -30,7 +30,7 @@ resp.check_edns(nsid=name) # 2) FQDN hostname. resp = server2.dig("example.com", "SOA", nsid=True) -resp.check_edns(nsid=socket.getfqdn()) +resp.check_edns(nsid=socket.gethostname()) # 3) Explicitly disabled. resp = server3.dig("example.com", "SOA", nsid=True) -- GitLab