mirror of
https://github.com/emqx/neuron.git
synced 2026-10-18 05:36:19 +08:00
fix(ut): compile warning
This commit is contained in:
+2
-2
@@ -58,7 +58,7 @@ TEST(HTTPTest, http_get_param)
|
||||
nng_url_parse(&url, "http://127.0.0.1");
|
||||
nng_http_req_alloc(&req, url);
|
||||
|
||||
for (int i = 0; i < sizeof(data) / sizeof(query_param_data_t); ++i) {
|
||||
for (uint64_t i = 0; i < sizeof(data) / sizeof(query_param_data_t); ++i) {
|
||||
nng_http_req_set_uri(req, (char *) data[i].uri);
|
||||
nng_aio_set_input(aio, 0, req);
|
||||
len = 0;
|
||||
@@ -135,7 +135,7 @@ TEST(HTTPTest, http_get_param_node_id)
|
||||
nng_url_parse(&url, "http://127.0.0.1");
|
||||
nng_http_req_alloc(&req, url);
|
||||
|
||||
for (int i = 0; i < sizeof(data) / sizeof(query_node_id_data_t); ++i) {
|
||||
for (uint64_t i = 0; i < sizeof(data) / sizeof(query_node_id_data_t); ++i) {
|
||||
neu_node_id_t prev_node_id = node_id;
|
||||
nng_http_req_set_uri(req, (char *) data[i].uri);
|
||||
nng_aio_set_input(aio, 0, req);
|
||||
|
||||
+3
-8
@@ -10,9 +10,7 @@
|
||||
zlog_category_t *neuron = NULL;
|
||||
TEST(JwtTest, SetJwt)
|
||||
{
|
||||
char * token = NULL;
|
||||
unsigned char public_key[4096] = { 0 };
|
||||
size_t pub_key_len = 0;
|
||||
char *token = NULL;
|
||||
|
||||
EXPECT_EQ(0, neu_jwt_init((char *) "./config"));
|
||||
|
||||
@@ -24,11 +22,8 @@ TEST(JwtTest, SetJwt)
|
||||
|
||||
TEST(JwtTest, JwtValidate)
|
||||
{
|
||||
char * token = NULL;
|
||||
char b_token[1024] = { 0 };
|
||||
unsigned char public_key[4096] = { 0 };
|
||||
size_t pub_key_len = 0;
|
||||
struct timeval expire_tv = { 0 };
|
||||
char *token = NULL;
|
||||
char b_token[1024] = { 0 };
|
||||
|
||||
EXPECT_EQ(0, neu_jwt_init((char *) "./config"));
|
||||
EXPECT_EQ(0, neu_jwt_new(&token));
|
||||
|
||||
Reference in New Issue
Block a user