summaryrefslogtreecommitdiff
path: root/tests/oauth.c
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2014-03-10 17:15:56 +0000
committerEmmanuele Bassi <ebassi@gnome.org>2014-03-10 17:15:56 +0000
commitedfdd515460272e4fd9c2244dc3d18f5f8809d9e (patch)
tree872dc5dfe340ddd674625300725a7b4bc3326efb /tests/oauth.c
parentdfcb399f0593f8696ff0ecae82967d99be72419c (diff)
downloadlibrest-edfdd515460272e4fd9c2244dc3d18f5f8809d9e.tar.gz
tests/oauth: Bail out if we cannot connect
It seems that http://term.ie/oauth/example/ is either down for the count, or down for good. In the meantime, let's try to be resilient against service outage at least during distcheck.
Diffstat (limited to 'tests/oauth.c')
-rw-r--r--tests/oauth.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/oauth.c b/tests/oauth.c
index eee4fa2..c1db284 100644
--- a/tests/oauth.c
+++ b/tests/oauth.c
@@ -45,6 +45,9 @@ main (int argc, char **argv)
/* First stage authentication, this gets a request token */
oauth_proxy_request_token (oproxy, "request_token.php", NULL, &error);
+ if (error != NULL && g_error_matches (error, REST_PROXY_ERROR, REST_PROXY_ERROR_CONNECTION))
+ return 0;
+
g_assert_no_error (error);
g_assert_cmpstr (priv->token, ==, "requestkey");
g_assert_cmpstr (priv->token_secret, ==, "requestsecret");