diff options
author | jpadkins <jacobpadkins@gmail.com> | 2017-04-05 19:54:44 +0300 |
---|---|---|
committer | jpadkins <jacobpadkins@gmail.com> | 2017-04-05 19:54:44 +0300 |
commit | d3776a71608da533fcb85a38fbfc684ee44c37ad (patch) | |
tree | adb8306a6e1d5174e0ea222a22c61b6ab8eb4db4 /check/magma | |
parent | a973ef09fdb35da21dc8db603d4d71d6e8e38577 (diff) |
Fixed missing st_char_get() since refactoring to stringers for commands
Diffstat (limited to 'check/magma')
-rw-r--r-- | check/magma/servers/camel/camel_check.c | 6 | ||||
-rw-r--r-- | check/magma/servers/camel/camel_check_network.c | 14 |
2 files changed, 7 insertions, 13 deletions
diff --git a/check/magma/servers/camel/camel_check.c b/check/magma/servers/camel/camel_check.c index b6f7e936..f6d6b3d9 100644 --- a/check/magma/servers/camel/camel_check.c +++ b/check/magma/servers/camel/camel_check.c @@ -28,9 +28,6 @@ START_TEST (check_camel_auth_s) { else if (!check_camel_auth_sthread(client, errmsg)){ outcome = false; } - else { - errmsg = NULL; - } log_test("CAMEL / LOGIN / SINGLE THREADED:", errmsg); ck_assert_msg(outcome, st_char_get(errmsg)); @@ -57,9 +54,6 @@ START_TEST (check_camel_basic_s) { else if (!check_camel_basic_sthread(client, errmsg)){ outcome = false; } - else { - errmsg = NULL; - } log_test("CAMEL / BASIC / 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 756156b5..cadff026 100644 --- a/check/magma/servers/camel/camel_check_network.c +++ b/check/magma/servers/camel/camel_check_network.c @@ -213,7 +213,7 @@ bool_t check_camel_basic_sthread(client_t *client, stringer_t *errmsg) { } // Test config.edit { key = "key", value = "value" } - if (!check_camel_json_write(client, commands[0], cookie, true) || client_status(client) != 1 || !check_camel_status(client) || + if (!check_camel_json_write(client, st_char_get(commands[0]), cookie, true) || client_status(client) != 1 || !check_camel_status(client) || !(content_length = check_http_content_length_get(client)) || !(json = check_camel_json_read(client, content_length))) { return false; @@ -222,7 +222,7 @@ bool_t check_camel_basic_sthread(client_t *client, stringer_t *errmsg) { st_free(json); // Test config.load - if (!check_camel_json_write(client, commands[1], cookie, true) || client_status(client) != 1 || !check_camel_status(client) || + if (!check_camel_json_write(client, st_char_get(commands[1]), cookie, true) || client_status(client) != 1 || !check_camel_status(client) || !(content_length = check_http_content_length_get(client)) || !(json = check_camel_json_read(client, content_length))) { return false; @@ -231,7 +231,7 @@ bool_t check_camel_basic_sthread(client_t *client, stringer_t *errmsg) { st_free(json); // Test config.edit { key = "key", "value" = null } - if (!check_camel_json_write(client, commands[2], cookie, true) || client_status(client) != 1 || !check_camel_status(client) || + if (!check_camel_json_write(client, st_char_get(commands[2]), cookie, true) || client_status(client) != 1 || !check_camel_status(client) || !(content_length = check_http_content_length_get(client)) || !(json = check_camel_json_read(client, content_length))) { return false; @@ -240,7 +240,7 @@ bool_t check_camel_basic_sthread(client_t *client, stringer_t *errmsg) { st_free(json); // Test config.load - if (!check_camel_json_write(client, commands[3], cookie, true) || client_status(client) != 1 || !check_camel_status(client) || + if (!check_camel_json_write(client, st_char_get(commands[3]), cookie, true) || client_status(client) != 1 || !check_camel_status(client) || !(content_length = check_http_content_length_get(client)) || !(json = check_camel_json_read(client, content_length))) { return false; @@ -249,7 +249,7 @@ bool_t check_camel_basic_sthread(client_t *client, stringer_t *errmsg) { st_free(json); // Test config.edit { key = "key.3943", value = "18346" } - if (!check_camel_json_write(client, commands[4], cookie, true) || client_status(client) != 1 || !check_camel_status(client) || + if (!check_camel_json_write(client, st_char_get(commands[4]), cookie, true) || client_status(client) != 1 || !check_camel_status(client) || !(content_length = check_http_content_length_get(client)) || !(json = check_camel_json_read(client, content_length))) { return false; @@ -258,7 +258,7 @@ bool_t check_camel_basic_sthread(client_t *client, stringer_t *errmsg) { st_free(json); // Test folders.add { context = "contacts", name = "Flight Crew" } - if (!check_camel_json_write(client, commands[5], cookie, true) || client_status(client) != 1 || !check_camel_status(client) || + if (!check_camel_json_write(client, st_char_get(commands[5]), cookie, true) || client_status(client) != 1 || !check_camel_status(client) || !(content_length = check_http_content_length_get(client)) || !(json = check_camel_json_read(client, content_length)) || json_unpack_d(json, "{s:{s:i}}", "result", "folderID", &folderid)) { @@ -268,7 +268,7 @@ bool_t check_camel_basic_sthread(client_t *client, stringer_t *errmsg) { st_free(json); // Test folders.list { context = "contacts" } - if (!check_camel_json_write(client, commands[6], cookie, true) || client_status(client) != 1 || !check_camel_status(client) || + if (!check_camel_json_write(client, st_char_get(commands[6]), cookie, true) || client_status(client) != 1 || !check_camel_status(client) || !(content_length = check_http_content_length_get(client)) || !(json = check_camel_json_read(client, content_length)) || json_unpack_d(json, "{s:[{s:i}]}", "result", "folderID", &folderid_buff) || folderid != folderid_buff) { |