diff options
| author | Anas Nashif <nashif@intel.com> | 2007-05-16 23:15:19 +0000 |
|---|---|---|
| committer | Anas Nashif <nashif@intel.com> | 2007-05-16 23:15:19 +0000 |
| commit | 6d02c9a6c69c7aeafdb0c55e5d70ffb5f0b06230 (patch) | |
| tree | 1480431c3f233ae4bf2af5a4bce44c7ff9158f9f /tests/cunit | |
| parent | 30a0e40701704a4388bea110acd0836df3716036 (diff) | |
| download | wsmancli-6d02c9a6c69c7aeafdb0c55e5d70ffb5f0b06230.tar.gz wsmancli-6d02c9a6c69c7aeafdb0c55e5d70ffb5f0b06230.tar.xz wsmancli-6d02c9a6c69c7aeafdb0c55e5d70ffb5f0b06230.zip | |
api changes
Diffstat (limited to 'tests/cunit')
| -rw-r--r-- | tests/cunit/common.c | 4 | ||||
| -rw-r--r-- | tests/cunit/enumeration.c | 14 | ||||
| -rw-r--r-- | tests/cunit/identify.c | 10 | ||||
| -rwxr-xr-x | tests/cunit/invoke.c | 10 | ||||
| -rw-r--r-- | tests/cunit/pull.c | 16 | ||||
| -rw-r--r-- | tests/cunit/transfer_get.c | 10 | ||||
| -rwxr-xr-x | tests/cunit/transfer_put.c | 8 |
7 files changed, 36 insertions, 36 deletions
diff --git a/tests/cunit/common.c b/tests/cunit/common.c index 93b210d..d41483c 100644 --- a/tests/cunit/common.c +++ b/tests/cunit/common.c @@ -26,7 +26,7 @@ int init_test(void) { {"localhost", 8889, "/wsman", "http", "wsman", "secret"} }; - cl = wsman_create_client( + cl = wsman_client_create( sd[0].server, sd[0].port, sd[0].path, @@ -39,7 +39,7 @@ int init_test(void) { int clean_test(void) { - wsman_release_client(cl); + wsman_client_release(cl); wsman_client_transport_fini(cl); return 0; } diff --git a/tests/cunit/enumeration.c b/tests/cunit/enumeration.c index 8d7a6b3..d689dcd 100644 --- a/tests/cunit/enumeration.c +++ b/tests/cunit/enumeration.c @@ -253,7 +253,7 @@ static int ntests = sizeof (tests) / sizeof (tests[0]); extern WsManClient *cl; -actionOptions *options; +client_opt_t *options; @@ -264,8 +264,8 @@ static void enumeration_test() { char *selectors = NULL; - reinit_client_connection(cl); - options = initialize_action_options(); + wsman_client_reinit_conn(cl); + options = wsman_client_options_init(); options->flags = tests[i].flags; @@ -276,7 +276,7 @@ static void enumeration_test() { } options->max_elements = tests[i].max_elements; - WsXmlDocH enum_response = wsenum_enumerate(cl, + WsXmlDocH enum_response = wsman_client_action_enumerate(cl, (char *)tests[i].resource_uri, options); CU_ASSERT_TRUE(wsman_client_get_response_code(cl) == tests[i].final_status); @@ -289,7 +289,7 @@ static void enumeration_test() { } CU_ASSERT_PTR_NOT_NULL(enum_response); if (enum_response) { - enumContext = wsenum_get_enum_context(enum_response); + enumContext = wsman_client_get_enum_context(enum_response); } else { goto RETURN; } @@ -305,7 +305,7 @@ static void enumeration_test() { RETURN: u_free(selectors); if (enumContext) { - wsenum_release(cl, + wsman_client_action_release(cl, (char *)tests[i].resource_uri, options, enumContext); @@ -313,7 +313,7 @@ RETURN: if (enum_response) { ws_xml_destroy_doc(enum_response); } - destroy_action_options(options); + wsman_client_options_destroy(options); i++; // decrease executed test number } diff --git a/tests/cunit/identify.c b/tests/cunit/identify.c index cb55a82..9e3b1d3 100644 --- a/tests/cunit/identify.c +++ b/tests/cunit/identify.c @@ -87,7 +87,7 @@ static int ntests = sizeof (tests) / sizeof (tests[0]); extern WsManClient *cl; -actionOptions *options; +client_opt_t *options; @@ -98,10 +98,10 @@ identify_test() { static int i = 0; char *xp = NULL; - reinit_client_connection(cl); - options = initialize_action_options(); + wsman_client_reinit_conn(cl); + options = wsman_client_options_init(); - response = wsman_identify(cl, options); + response = wsman_client_action_identify(cl, options); CU_ASSERT_TRUE(wsman_client_get_response_code(cl) == tests[i].final_status); CU_ASSERT_PTR_NOT_NULL(response); @@ -122,7 +122,7 @@ RETURN: ws_xml_destroy_doc(response); } u_free(xp); - destroy_action_options(options); + wsman_client_options_destroy(options); i++; } diff --git a/tests/cunit/invoke.c b/tests/cunit/invoke.c index da41104..78e13a6 100755 --- a/tests/cunit/invoke.c +++ b/tests/cunit/invoke.c @@ -181,7 +181,7 @@ static int ntests = sizeof (invoke_tests) / sizeof (invoke_tests[0]); extern WsManClient *cl; -actionOptions *options; +client_opt_t *options; static void invoke_test() { WsXmlDocH doc; @@ -191,13 +191,13 @@ static void invoke_test() { char *selectors = NULL; - options = initialize_action_options(); + options = wsman_client_options_init(); if (invoke_tests[i].selectors) { selectors = u_strdup_printf(invoke_tests[i].selectors, host, host, host); } - reinit_client_connection(cl); + wsman_client_reinit_conn(cl); if (selectors != NULL) { wsman_add_selectors_from_query_string (options, selectors); @@ -208,7 +208,7 @@ static void invoke_test() { } options->flags = invoke_tests[i].flags; - doc = wsman_invoke(cl, (char *)invoke_tests[i].resource_uri, options, + doc = wsman_client_action_invoke(cl, (char *)invoke_tests[i].resource_uri, options, (char *)invoke_tests[i].method, NULL); //ws_xml_dump_node_tree(stdout, ws_xml_get_doc_root(doc)); CU_ASSERT_TRUE(wsman_client_get_response_code(cl) == @@ -274,7 +274,7 @@ RETURN: ws_xml_destroy_doc(doc); } u_free(selectors); - destroy_action_options(options); + wsman_client_options_destroy(options); i++; // increase executed test number } diff --git a/tests/cunit/pull.c b/tests/cunit/pull.c index 62e6a61..71dcb54 100644 --- a/tests/cunit/pull.c +++ b/tests/cunit/pull.c @@ -151,7 +151,7 @@ static int ntests = sizeof (pull_tests) / sizeof (pull_tests[0]); extern WsManClient *cl; -actionOptions *options; +client_opt_t *options; static void pull_test() { char *enumContext = NULL; @@ -159,8 +159,8 @@ static void pull_test() { char *xp = NULL; int num; - reinit_client_connection(cl); - options = initialize_action_options(); + wsman_client_reinit_conn(cl); + options = wsman_client_options_init(); options->flags = pull_tests[i].flags; @@ -168,7 +168,7 @@ static void pull_test() { wsman_add_selectors_from_query_string(options, pull_tests[i].selectors); options->max_elements = pull_tests[i].max_elements; - WsXmlDocH enum_response = wsenum_enumerate(cl, + WsXmlDocH enum_response = wsman_client_action_enumerate(cl, (char *)pull_tests[i].resource_uri, options); CU_ASSERT_TRUE(wsman_client_get_response_code(cl) == pull_tests[i].final_status); @@ -183,13 +183,13 @@ static void pull_test() { CU_ASSERT_PTR_NOT_NULL(enum_response); if (enum_response) { - enumContext = wsenum_get_enum_context(enum_response); + enumContext = wsman_client_get_enum_context(enum_response); } else { enumContext = NULL; } while (enumContext != NULL) { - WsXmlDocH docp = wsenum_pull(cl, (char *)pull_tests[i].resource_uri, + WsXmlDocH docp = wsman_client_action_pull(cl, (char *)pull_tests[i].resource_uri, options, enumContext); CU_ASSERT_PTR_NOT_NULL(docp); if (!docp) { @@ -223,7 +223,7 @@ static void pull_test() { } goto RETURN; } - enumContext = wsenum_get_enum_context(docp); + enumContext = wsman_client_get_enum_context(docp); ws_xml_destroy_doc(docp); } @@ -234,7 +234,7 @@ RETURN: ws_xml_destroy_doc(enum_response); } u_free(xp); - destroy_action_options(options); + wsman_client_options_destroy(options); i++; // decrease executed test number } diff --git a/tests/cunit/transfer_get.c b/tests/cunit/transfer_get.c index c6538f3..5a17e3e 100644 --- a/tests/cunit/transfer_get.c +++ b/tests/cunit/transfer_get.c @@ -156,7 +156,7 @@ static int ntests = sizeof (get_tests) / sizeof (get_tests[0]); extern WsManClient *cl; -actionOptions *options; +client_opt_t *options; static void transfer_get_test() { WsXmlDocH doc; @@ -171,15 +171,15 @@ static void transfer_get_test() { u_strdup_printf(get_tests[i].selectors, host, host, host); } - reinit_client_connection(cl); - options = initialize_action_options(); + wsman_client_reinit_conn(cl); + options = wsman_client_options_init(); if (get_tests[i].selectors != NULL) { wsman_add_selectors_from_query_string (options, get_tests[i].selectors); } - doc = ws_transfer_get(cl, (char *)get_tests[i].resource_uri, options); + doc = wsman_client_action_get(cl, (char *)get_tests[i].resource_uri, options); CU_ASSERT_TRUE(wsman_client_get_response_code(cl) == get_tests[i].final_status); CU_ASSERT_PTR_NOT_NULL(doc); @@ -229,7 +229,7 @@ RETURN: } u_free((char *)get_tests[i].selectors); get_tests[i].selectors = old_selectors; - destroy_action_options(options); + wsman_client_options_destroy(options); i++; // increase executed test number } diff --git a/tests/cunit/transfer_put.c b/tests/cunit/transfer_put.c index d90abb5..9b25a4c 100755 --- a/tests/cunit/transfer_put.c +++ b/tests/cunit/transfer_put.c @@ -166,7 +166,7 @@ static int ntests = sizeof (put_tests) / sizeof (put_tests[0]); extern WsManClient *cl; -actionOptions *options; +client_opt_t *options; static void transfer_put_test() { WsXmlDocH doc; @@ -181,7 +181,7 @@ static void transfer_put_test() { u_strdup_printf(put_tests[i].selectors, host, host, host); } - options = initialize_action_options(); + options = wsman_client_options_init(); if (put_tests[i].selectors != NULL) { wsman_add_selectors_from_query_string (options, selectors); @@ -193,7 +193,7 @@ static void transfer_put_test() { options->flags = put_tests[i].flags; - doc = ws_transfer_get_and_put(cl, (char *)put_tests[i].resource_uri, options); + doc = wsman_client_action_get_and_put(cl, (char *)put_tests[i].resource_uri, options); //ws_xml_dump_node_tree(stdout, ws_xml_get_doc_root(doc)); CU_ASSERT_TRUE(wsman_client_get_response_code(cl) == put_tests[i].final_status); @@ -259,7 +259,7 @@ RETURN: ws_xml_destroy_doc(doc); } u_free(selectors); - destroy_action_options(options); + wsman_client_options_destroy(options); i++; // increase executed test number } |
