diff --git a/tests/unittests/tests-gcoap/tests-gcoap.c b/tests/unittests/tests-gcoap/tests-gcoap.c index 7355222b5296..e1e0c70d64e1 100644 --- a/tests/unittests/tests-gcoap/tests-gcoap.c +++ b/tests/unittests/tests-gcoap/tests-gcoap.c @@ -174,38 +174,6 @@ static void test_gcoap__client_put_req_overfill(void) TEST_ASSERT_EQUAL_INT(-ENOSPC, len); } -/* - * Builds on get_req test, to test coap_opt_add_uqery() to add Uri-Query - * options. - */ -static void test_gcoap__client_get_query(void) -{ - uint8_t buf[GCOAP_PDU_BUF_SIZE]; - coap_pkt_t pdu; - char path[] = "/time"; - char key1[] = "ab"; - char val1[] = "cde"; - char key2[] = "f"; - char expected[] = "ab=cde&f"; - ssize_t optlen; - - gcoap_req_init(&pdu, buf, GCOAP_PDU_BUF_SIZE, COAP_METHOD_GET, path); - - optlen = coap_opt_add_uquery(&pdu, key1, val1); - TEST_ASSERT_EQUAL_INT(7, optlen); - optlen = coap_opt_add_uquery(&pdu, key2, NULL); - TEST_ASSERT_EQUAL_INT(2, optlen); - - size_t len = coap_opt_finish(&pdu, COAP_OPT_FINISH_NONE); - - coap_parse(&pdu, buf, len); - - char query[20] = {0}; - coap_get_uri_query(&pdu, (uint8_t *)&query[0]); - /* skip initial '&' from coap_get_uri_query() */ - TEST_ASSERT_EQUAL_STRING(&expected[0], &query[1]); -} - /* * Builds on get_req test, to test use of NULL path with gcoap_req_init(). * Then separately add Uri-Path option later. @@ -399,7 +367,6 @@ Test *tests_gcoap_tests(void) new_TestFixture(test_gcoap__client_get_resp), new_TestFixture(test_gcoap__client_put_req), new_TestFixture(test_gcoap__client_put_req_overfill), - new_TestFixture(test_gcoap__client_get_query), new_TestFixture(test_gcoap__client_get_path_defer), new_TestFixture(test_gcoap__server_get_req), new_TestFixture(test_gcoap__server_get_resp),