[librest] tests/oauth: Use oauthbin.com as the test server
- From: Christophe Fergeau <teuf src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librest] tests/oauth: Use oauthbin.com as the test server
- Date: Wed, 3 Sep 2014 08:56:27 +0000 (UTC)
commit 6942de4c813b323a61cfe1414cea3c2a20d6e02b
Author: Christophe Fergeau <cfergeau redhat com>
Date: Tue Sep 2 17:41:53 2014 +0200
tests/oauth: Use oauthbin.com as the test server
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
tests/oauth-async.c | 12 ++++++------
tests/oauth.c | 12 ++++++------
2 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/tests/oauth-async.c b/tests/oauth-async.c
index a8fcdbb..f23f985 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);
@@ -99,7 +99,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);
}
@@ -130,13 +130,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 639060d..f8eca46 100644
--- a/tests/oauth.c
+++ b/tests/oauth.c
@@ -39,14 +39,14 @@ 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);
if (error != NULL && g_error_matches (error, REST_PROXY_ERROR, REST_PROXY_ERROR_CONNECTION))
return 0;
@@ -55,7 +55,7 @@ main (int argc, char **argv)
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");
@@ -64,7 +64,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);
@@ -72,7 +72,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);
@@ -80,7 +80,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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]