diff options
author | jpadkins <jacobpadkins@gmail.com> | 2017-04-12 09:06:00 +0300 |
---|---|---|
committer | jpadkins <jacobpadkins@gmail.com> | 2017-04-12 09:06:00 +0300 |
commit | 3f8702674ce7e0a00c96966add0f40714e368c77 (patch) | |
tree | 2a7b7e9bc7f433b19c03094dc56ccccff0015424 | |
parent | 3dad2fc249f7a1aa9883b8b68e85a594b1a0a1da (diff) | |
parent | 223f7ac0f5042bad352ab1adae007c9a5351b848 (diff) |
Merge branch 'feature/more-camel-tests' of https://github.com/jpadkins/magma into feature/more-camel-tests
-rw-r--r-- | check/magma/servers/camel/camel_check.c | 1 | ||||
-rw-r--r-- | check/magma/servers/camel/camel_check_network.c | 3 | ||||
-rwxr-xr-x | dev/scripts/test/t.camel.sh | 8 |
3 files changed, 5 insertions, 7 deletions
diff --git a/check/magma/servers/camel/camel_check.c b/check/magma/servers/camel/camel_check.c index de833856..2e762dfb 100644 --- a/check/magma/servers/camel/camel_check.c +++ b/check/magma/servers/camel/camel_check.c @@ -15,6 +15,7 @@ START_TEST (check_camel_auth_s) { stringer_t *errmsg = MANAGEDBUF(1024); if (status() && !check_camel_auth_sthread(false, errmsg)) outcome = false; + else if (status() && outcome && !check_camel_auth_sthread(true, errmsg)) outcome = false; log_test("HTTP / NETWORK / CAMEL / LOGIN / SINGLE THREADED:", errmsg); ck_assert_msg(outcome, st_char_get(errmsg)); diff --git a/check/magma/servers/camel/camel_check_network.c b/check/magma/servers/camel/camel_check_network.c index 99f5f982..25756c0d 100644 --- a/check/magma/servers/camel/camel_check_network.c +++ b/check/magma/servers/camel/camel_check_network.c @@ -342,16 +342,13 @@ bool_t check_camel_login(stringer_t *user, stringer_t *pass, stringer_t *cookie, // LOW: Test the four different ways of preserving a session token: Cookie, URL param, JSON param, Form post. bool_t check_camel_auth_sthread(bool_t secure, stringer_t *errmsg) { - client_t *client = NULL; stringer_t *cookie = MANAGEDBUF(1024); if (!check_camel_login(PLACER("princess", 8), PLACER("password", 8), cookie, secure)) { - st_sprint(errmsg, "Failed to return successful state after auth request."); return false; } - client_close(client); return true; } diff --git a/dev/scripts/test/t.camel.sh b/dev/scripts/test/t.camel.sh index fbbe9c6a..e16ad917 100755 --- a/dev/scripts/test/t.camel.sh +++ b/dev/scripts/test/t.camel.sh @@ -8,7 +8,7 @@ export USERID="magma" export PASSWORD="password" export COOKIES=`mktemp` export SQLHOST="localhost" -export CAMELHOST="http://localhost:10000" +export CAMELHOST="https://localhost:10500" export CAMELPATH="$CAMELHOST/portal/camel" # Check and make sure magmad is running before attempting a connection. @@ -27,7 +27,7 @@ if [ -z "$PID" ]; then exit 2 fi -wget --quiet --retry-connrefused --connect-timeout=1 --waitretry=1 --tries=0 --output-document=/dev/null "$CAMELHOST" +wget --quiet --no-check-certificate --retry-connrefused --connect-timeout=1 --waitretry=1 --tries=0 --output-document=/dev/null "$CAMELHOST" if [ $? != 0 ]; then tput setaf 1; tput bold; echo "tired of waiting on the magma daemon start"; tput sgr0 exit @@ -41,12 +41,12 @@ submit() { # Submit using cURL # To print the server supplied HTTP headers add --include - # export OUTPUT=`curl --silent --cookie "$COOKIES" --cookie-jar "$COOKIES" --data "$1" "$CAMELPATH"` + export OUTPUT=`curl --insecure --silent --cookie "$COOKIES" --cookie-jar "$COOKIES" --data "$1" "$CAMELPATH"` # Submit using wget # To print the server supplied HTTP headers add --server-response - export OUTPUT=`wget --load-cookies="$COOKIES" --save-cookies="$COOKIES" --quiet --output-document=- --post-data="$1" "$CAMELPATH"` + #export OUTPUT=`wget --no-check-certificate --load-cookies="$COOKIES" --save-cookies="$COOKIES" --quiet --output-document=- --post-data="$1" "$CAMELPATH"` if [[ "$OUTPUT" =~ "\"result\":" ]] && [[ ! "$OUTPUT" =~ "\"failed\"" ]]; then tput setaf 2; tput bold; echo $OUTPUT |