summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael Klishin <michael@clojurewerkz.org>2020-08-24 20:11:21 +0300
committerMichael Klishin <michael@clojurewerkz.org>2020-08-24 20:11:21 +0300
commit352f90f22c68b5f76e8a1e4041cd4237bc1ea1e1 (patch)
treeeb1a7ca23ecbd55502e61913ed3b8ae0a148c17c /test
parentf2f78e0028ca58c9a1670d14c65d5e478e52bd6f (diff)
downloadrabbitmq-server-git-352f90f22c68b5f76e8a1e4041cd4237bc1ea1e1.tar.gz
Update peer_discovery_dns suite
to use more stable publicly available hostnames. Per suggestion from @lukebakken
Diffstat (limited to 'test')
-rw-r--r--test/peer_discovery_dns_SUITE.erl17
1 files changed, 9 insertions, 8 deletions
diff --git a/test/peer_discovery_dns_SUITE.erl b/test/peer_discovery_dns_SUITE.erl
index 7e88bd76e4..5184bc11eb 100644
--- a/test/peer_discovery_dns_SUITE.erl
+++ b/test/peer_discovery_dns_SUITE.erl
@@ -40,9 +40,10 @@ suite() ->
%% Testsuite setup/teardown.
%% -------------------------------------------------------------------
--define(DISCOVERY_ENDPOINT_RECORD_A, "peer_discovery.tests.ipv4.rabbitmq.com").
-
--define(DISCOVERY_ENDPOINT_RECORD_AAAA, "www.v6.facebook.com").
+%% These are stable, publicly resolvable hostnames that
+%% both return A and AAAA records that reverse resolve.
+-define(DISCOVERY_ENDPOINT_RECORD_A, "dns.google").
+-define(DISCOVERY_ENDPOINT_RECORD_AAAA, "dns.google").
init_per_suite(Config) ->
rabbit_ct_helpers:log_environment(),
@@ -84,20 +85,20 @@ end_per_testcase(_Testcase, Config) ->
test_aaaa_record_hostname_discovery(_) ->
Result = rabbit_peer_discovery_dns:discover_hostnames(?DISCOVERY_ENDPOINT_RECORD_AAAA, true),
- ?assert(string:str(lists:flatten(Result), "facebook.com") > 0).
+ ?assert(string:str(lists:flatten(Result), "dns.google") > 0).
hostname_discovery_with_long_node_names(_) ->
Result = rabbit_peer_discovery_dns:discover_hostnames(?DISCOVERY_ENDPOINT_RECORD_A, true),
- ?assert(lists:member("www.rabbitmq.com", Result)).
+ ?assert(lists:member("dns.google", Result)).
hostname_discovery_with_short_node_names(_) ->
Result = rabbit_peer_discovery_dns:discover_hostnames(?DISCOVERY_ENDPOINT_RECORD_A, false),
- ?assert(lists:member("www", Result)).
+ ?assert(lists:member("dns", Result)).
node_discovery_with_long_node_names(_) ->
Result = rabbit_peer_discovery_dns:discover_nodes(?DISCOVERY_ENDPOINT_RECORD_A, true),
- ?assert(lists:member('ct_rabbit@www.rabbitmq.com', Result)).
+ ?assert(lists:member('ct_rabbit@dns.google', Result)).
node_discovery_with_short_node_names(_) ->
Result = rabbit_peer_discovery_dns:discover_nodes(?DISCOVERY_ENDPOINT_RECORD_A, false),
- ?assert(lists:member(ct_rabbit@www, Result)).
+ ?assert(lists:member(ct_rabbit@dns, Result)).