diff options
author | Christophe Fergeau <cfergeau@redhat.com> | 2014-09-02 17:41:53 +0200 |
---|---|---|
committer | Christophe Fergeau <cfergeau@redhat.com> | 2014-09-03 12:17:29 +0200 |
commit | c02cf1eeddffc473c8dcf7dbf85e11d44c49526e (patch) | |
tree | fa4fa0d450ddecfd6a11e7b0340f010e28f96af1 | |
parent | 0f370f93ecf34b4130079b0b4fe8853c82f8f0c3 (diff) |
tests/oauth: Use oauthbin.com as the test serverrhel-7.1
The tests used to use term.ie which is gone.
There are still some intermittent failures when running the tests,
sometimes the test is successful, sometimes it's not :(
https://bugzilla.gnome.org/show_bug.cgi?id=735921
(cherry picked from commit 6942de4c813b323a61cfe1414cea3c2a20d6e02b)
-rw-r--r-- | tests/oauth-async.c | 12 | ||||
-rw-r--r-- | tests/oauth.c | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/tests/oauth-async.c b/tests/oauth-async.c index d6c9a0b..a66712d 100644 --- a/tests/oauth-async.c +++ b/tests/oauth-async.c @@ -37,7 +37,7 @@ make_calls (OAuthProxy *oproxy) /* Make some test calls */ call = rest_proxy_new_call (proxy); - rest_proxy_call_set_function (call, "echo_api.php"); + rest_proxy_call_set_function (call, "echo"); rest_proxy_call_add_param (call, "foo", "bar"); if (!rest_proxy_call_run (call, NULL, &error)) g_error ("Cannot make call: %s", error->message); @@ -45,7 +45,7 @@ make_calls (OAuthProxy *oproxy) g_object_unref (call); call = rest_proxy_new_call (proxy); - rest_proxy_call_set_function (call, "echo_api.php"); + rest_proxy_call_set_function (call, "echo"); rest_proxy_call_add_param (call, "numbers", "1234567890"); if (!rest_proxy_call_run (call, NULL, &error)) g_error ("Cannot make call: %s", error->message); @@ -53,7 +53,7 @@ make_calls (OAuthProxy *oproxy) g_object_unref (call); call = rest_proxy_new_call (proxy); - rest_proxy_call_set_function (call, "echo_api.php"); + rest_proxy_call_set_function (call, "echo"); rest_proxy_call_add_param (call, "escape", "!£$%^&*()"); if (!rest_proxy_call_run (call, NULL, &error)) g_error ("Cannot make call: %s", error->message); @@ -93,7 +93,7 @@ request_token_cb (OAuthProxy *proxy, g_assert_cmpstr (priv->token_secret, ==, "requestsecret"); /* Second stage authentication, this gets an access token */ - oauth_proxy_access_token_async (proxy, "access_token.php", NULL, + oauth_proxy_access_token_async (proxy, "access-token", NULL, access_token_cb, NULL, NULL, &err); g_assert_no_error (err); } @@ -122,13 +122,13 @@ main (int argc, char **argv) /* Create the proxy */ proxy = oauth_proxy_new ("key", "secret", - "http://term.ie/oauth/example/", + "http://oauthbin.com/v1/", FALSE); oproxy = OAUTH_PROXY (proxy); g_assert (oproxy); /* First stage authentication, this gets a request token */ - oauth_proxy_request_token_async (oproxy, "request_token.php", NULL, + oauth_proxy_request_token_async (oproxy, "request-token", NULL, request_token_cb, NULL, NULL, &error); g_assert_no_error (error); diff --git a/tests/oauth.c b/tests/oauth.c index eee4fa2..07e42e2 100644 --- a/tests/oauth.c +++ b/tests/oauth.c @@ -37,20 +37,20 @@ main (int argc, char **argv) /* Create the proxy */ proxy = oauth_proxy_new ("key", "secret", - "http://term.ie/oauth/example/", + "http://oauthbin.com/v1/", FALSE); oproxy = OAUTH_PROXY (proxy); g_assert (oproxy); priv = PROXY_GET_PRIVATE (oproxy); /* First stage authentication, this gets a request token */ - oauth_proxy_request_token (oproxy, "request_token.php", NULL, &error); + oauth_proxy_request_token (oproxy, "request-token", NULL, &error); g_assert_no_error (error); g_assert_cmpstr (priv->token, ==, "requestkey"); g_assert_cmpstr (priv->token_secret, ==, "requestsecret"); /* Second stage authentication, this gets an access token */ - oauth_proxy_access_token (OAUTH_PROXY (proxy), "access_token.php", NULL, &error); + oauth_proxy_access_token (OAUTH_PROXY (proxy), "access-token", NULL, &error); g_assert_no_error (error); g_assert_cmpstr (priv->token, ==, "accesskey"); @@ -59,7 +59,7 @@ main (int argc, char **argv) /* Make some test calls */ call = rest_proxy_new_call (proxy); - rest_proxy_call_set_function (call, "echo_api.php"); + rest_proxy_call_set_function (call, "echo"); rest_proxy_call_add_param (call, "foo", "bar"); if (!rest_proxy_call_sync (call, &error)) g_error ("Cannot make call: %s", error->message); @@ -67,7 +67,7 @@ main (int argc, char **argv) g_object_unref (call); call = rest_proxy_new_call (proxy); - rest_proxy_call_set_function (call, "echo_api.php"); + rest_proxy_call_set_function (call, "echo"); rest_proxy_call_add_param (call, "numbers", "1234567890"); if (!rest_proxy_call_sync (call, &error)) g_error ("Cannot make call: %s", error->message); @@ -75,7 +75,7 @@ main (int argc, char **argv) g_object_unref (call); call = rest_proxy_new_call (proxy); - rest_proxy_call_set_function (call, "echo_api.php"); + rest_proxy_call_set_function (call, "echo"); rest_proxy_call_add_param (call, "escape", "!+£$%^&*()"); if (!rest_proxy_call_sync (call, &error)) g_error ("Cannot make call: %s", error->message); |