|
22 | 22 | #define INVALID_UUID "/abcdefg"
|
23 | 23 |
|
24 | 24 | // It should returns 200 when UUID, TOPIC and MESSAGE are valids
|
25 |
| -static void test_valid_POST() { |
| 25 | +static void Test_Valid_POST() { |
26 | 26 | CURL *curl;
|
27 | 27 | CURLcode res;
|
28 | 28 | long http_code = 0;
|
@@ -52,7 +52,7 @@ static void test_valid_POST() {
|
52 | 52 | }
|
53 | 53 |
|
54 | 54 | // It should returns 401 when UUID is not valid
|
55 |
| -static void test_invalid_UUID() { |
| 55 | +static void Test_Invalid_UUID() { |
56 | 56 | CURL *curl;
|
57 | 57 | CURLcode res;
|
58 | 58 | long http_code = 0;
|
@@ -82,7 +82,7 @@ static void test_invalid_UUID() {
|
82 | 82 | }
|
83 | 83 |
|
84 | 84 | // It should returns 403 when Topic is not valid
|
85 |
| -static void test_invalid_topic() { |
| 85 | +static void Test_Invalid_Topic() { |
86 | 86 | CURL *curl;
|
87 | 87 | CURLcode res;
|
88 | 88 | long http_code = 0;
|
@@ -111,7 +111,7 @@ static void test_invalid_topic() {
|
111 | 111 | free(url);
|
112 | 112 | }
|
113 | 113 |
|
114 |
| -static void test_no_topic() { |
| 114 | +static void Test_No_Topic() { |
115 | 115 | CURL *curl;
|
116 | 116 | CURLcode res;
|
117 | 117 | long http_code = 0;
|
@@ -139,7 +139,7 @@ static void test_no_topic() {
|
139 | 139 | free(url);
|
140 | 140 | }
|
141 | 141 |
|
142 |
| -static void test_empty_body() { |
| 142 | +static void Test_Empty_Body() { |
143 | 143 | CURL *curl;
|
144 | 144 | CURLcode res;
|
145 | 145 | long http_code = 0;
|
@@ -169,7 +169,7 @@ static void test_empty_body() {
|
169 | 169 | }
|
170 | 170 |
|
171 | 171 | // It should returns 403 when Topic is not valid
|
172 |
| -static void test_invalid_URL() { |
| 172 | +static void Test_Invalid_URL() { |
173 | 173 | CURL *curl;
|
174 | 174 | CURLcode res;
|
175 | 175 | long http_code = 0;
|
@@ -199,7 +199,7 @@ static void test_invalid_URL() {
|
199 | 199 | }
|
200 | 200 |
|
201 | 201 | // It should returns 403 when Topic is not valid
|
202 |
| -static void test_deflate() { |
| 202 | +static void Test_Deflate() { |
203 | 203 | z_stream defstream;
|
204 | 204 | defstream.zalloc = Z_NULL;
|
205 | 205 | defstream.zfree = Z_NULL;
|
@@ -278,10 +278,10 @@ int main() {
|
278 | 278 | sleep(1);
|
279 | 279 |
|
280 | 280 | const struct CMUnitTest tests[] = {
|
281 |
| - cmocka_unit_test(test_valid_POST), cmocka_unit_test(test_invalid_UUID), |
282 |
| - cmocka_unit_test(test_invalid_topic), cmocka_unit_test(test_no_topic), |
283 |
| - cmocka_unit_test(test_invalid_URL), cmocka_unit_test(test_deflate), |
284 |
| - cmocka_unit_test(test_empty_body)}; |
| 281 | + cmocka_unit_test(Test_Valid_POST), cmocka_unit_test(Test_Invalid_UUID), |
| 282 | + cmocka_unit_test(Test_Invalid_Topic), cmocka_unit_test(Test_No_Topic), |
| 283 | + cmocka_unit_test(Test_Invalid_URL), cmocka_unit_test(Test_Deflate), |
| 284 | + cmocka_unit_test(Test_Empty_Body)}; |
285 | 285 | const int res = cmocka_run_group_tests(tests, NULL, NULL);
|
286 | 286 |
|
287 | 287 | curl_global_cleanup();
|
|
0 commit comments