summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <philip@tecnocode.co.uk>2016-08-03 00:56:10 +0100
committerPhilip Withnall <philip@tecnocode.co.uk>2016-08-03 00:56:10 +0100
commit7d9cec6bab94a7de67fcaf72987df4349296191a (patch)
tree4d4b39a59446302651689f9c5f016c0fc6a65ddd
parentefb3f3fd3b5a7656b5d878943d1c3304262a6340 (diff)
downloadlibgdata-7d9cec6bab94a7de67fcaf72987df4349296191a.tar.gz
tests: Use correct invalid TLD rather than localhost
RFC 6761 specifies an entire top-level domain which is guaranteed to never resolve with a DNS query: invalid. Use that instead of localhost, to eliminate the chance that the domain name we thought should never resolve, actually resolves. https://tools.ietf.org/html/rfc6761#section-6.4 This might fix bug #768282. https://bugzilla.gnome.org/show_bug.cgi?id=768282
-rw-r--r--gdata/tests/general.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdata/tests/general.c b/gdata/tests/general.c
index 1e308880..070d34cb 100644
--- a/gdata/tests/general.c
+++ b/gdata/tests/general.c
@@ -1425,7 +1425,7 @@ test_service_network_error (void)
service = g_object_new (GDATA_TYPE_SERVICE, NULL);
/* Try a query which should always fail due to errors resolving the hostname */
- g_assert (gdata_service_query (service, NULL, "http://thisshouldnotexist.localhost", NULL, GDATA_TYPE_ENTRY,
+ g_assert (gdata_service_query (service, NULL, "http://thisshouldnotexist.invalid", NULL, GDATA_TYPE_ENTRY,
NULL, NULL, NULL, &error) == NULL);
g_assert_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_NETWORK_ERROR);
g_clear_error (&error);
@@ -1434,7 +1434,7 @@ test_service_network_error (void)
* Filed as bgo#632354. */
#if 0
/* Try one with a bad proxy set */
- proxy_uri = soup_uri_new ("http://thisshouldalsonotexist.localhost/proxy");
+ proxy_uri = soup_uri_new ("http://thisshouldalsonotexist.invalid/proxy");
gdata_service_set_proxy_uri (service, proxy_uri);
soup_uri_free (proxy_uri);