X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=test%2Fblackbox%2Frun_blackbox_tests%2Ftest_cases_submesh04.c;h=547642389f51b642ff5be3e4219ec64ccf69a65c;hb=3064919617195642e1ffc52fac375b05ec961a27;hp=96c117a58480a05694a9e5489d998db20df013c3;hpb=4108810af455f463dfbcdac0e2e0b2ba0312bf26;p=meshlink diff --git a/test/blackbox/run_blackbox_tests/test_cases_submesh04.c b/test/blackbox/run_blackbox_tests/test_cases_submesh04.c index 96c117a5..54764238 100644 --- a/test/blackbox/run_blackbox_tests/test_cases_submesh04.c +++ b/test/blackbox/run_blackbox_tests/test_cases_submesh04.c @@ -16,6 +16,11 @@ with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ + +#ifdef NDEBUG +#undef NDEBUG +#endif + #include #include #include @@ -58,6 +63,8 @@ static black_box_state_t test_case_submesh_4_state = { }; static int black_box_group0_setup(void **state) { + (void)state; + const char *nodes[] = { "corenode1", "app1node1", "app1node2" }; int num_nodes = sizeof(nodes) / sizeof(nodes[0]); @@ -69,35 +76,26 @@ static int black_box_group0_setup(void **state) { } static int black_box_group0_teardown(void **state) { + (void)state; + PRINT_TEST_CASE_MSG("Destroying Containers\n"); destroy_containers(); return 0; } -static int black_box_all_nodes_setup(void **state) { - const char *nodes[] = { "corenode1" }; - int num_nodes = sizeof(nodes) / sizeof(nodes[0]); - - PRINT_TEST_CASE_MSG("Creating Containers\n"); - destroy_containers(); - create_containers(nodes, num_nodes); - PRINT_TEST_CASE_MSG("Created Containers\n"); - return 0; -} - static bool event_cb(mesh_event_payload_t payload) { static node_status_t node_status[3] = { - {core_node1, 0, 3, false}, - {app1_node1, 0, 4, false}, - {app1_node2, 0, 7, false} + {core_node1, 0, 3}, + {app1_node1, 0, 4}, + {app1_node2, 0, 7}, }; fprintf(stderr, "%s(%lu) : %s\n", event_node_name[payload.client_id], time(NULL), event_status[payload.mesh_event]); assert(change_state(&node_status[payload.client_id], payload.mesh_event)); if(payload.mesh_event == NODE_JOINED) { - signal_node_start(node_status, 1, 2, node_ids); + signal_node_start(node_status, 1, 2, (char **)node_ids); } if(check_nodes_finished(node_status, 3)) { @@ -131,10 +129,7 @@ static void test_case_submesh_04(void **state) { */ static bool test_steps_submesh_04(void) { char *invite_app1node1, *invite_app1node2; - bool result = false; - int i; char *import; - pthread_t thread1, thread2; import = mesh_event_sock_create(eth_if_name); invite_app1node1 = invite_in_container("corenode1", "app1node1"); @@ -165,4 +160,4 @@ int test_cases_submesh04(void) { total_tests += sizeof(blackbox_group0_tests) / sizeof(blackbox_group0_tests[0]); return cmocka_run_group_tests(blackbox_group0_tests, black_box_group0_setup, black_box_group0_teardown); -} \ No newline at end of file +}