diff --git a/tests_e2e/tests/publish_hostname/publish_hostname.py b/tests_e2e/tests/publish_hostname/publish_hostname.py index cae1a2383e..cc74a596b6 100644 --- a/tests_e2e/tests/publish_hostname/publish_hostname.py +++ b/tests_e2e/tests/publish_hostname/publish_hostname.py @@ -55,7 +55,7 @@ def add_vm_password(self): def check_and_install_dns_tools(self): lookup_cmd = "dig -x {0}".format(self._private_ip) - dns_regex = r"[\S\s]*;; ANSWER SECTION:\s.*PTR\s*(?P.*).internal.cloudapp.net.[\S\s]*" + dns_regex = r"[\S\s]*;; ANSWER SECTION:\s.*PTR\s*(?P.*)\.internal\.(cloudapp\.net|chinacloudapp\.cn|usgovcloudapp\.net).*[\S\s]*" # Not all distros come with dig. Install dig if not on machine try: @@ -66,7 +66,7 @@ def check_and_install_dns_tools(self): if "debian_9" in distro: # Debian 9 hostname look up needs to be done with "host" instead of dig lookup_cmd = "host {0}".format(self._private_ip) - dns_regex = r".*pointer\s(?P.*).internal.cloudapp.net." + dns_regex = r".*pointer\s(?P.*)\.internal\.(cloudapp\.net|chinacloudapp\.cn|usgovcloudapp\.net).*" elif "debian" in distro: self._ssh_client.run_command("apt install -y dnsutils", use_sudo=True) elif "alma" in distro or "rocky" in distro: