diff --git a/ft/normal_test.robot b/ft/normal_test.robot index df1239ae..e7c90d9c 100644 --- a/ft/normal_test.robot +++ b/ft/normal_test.robot @@ -7,11 +7,11 @@ Suite Teardown Stop Neuronx *** Test Cases *** login with invalid username and password, it should return failure - POST /api/v2/login {"name":"admin1", "pass": "0000"} + POST /api/v2/login {"name":"admin1", "pass": "Lrlq6si6%GUvok$B"} Integer response status 401 Integer $.error ${NEU_ERR_INVALID_USER_OR_PASSWORD} login with username and password, it should return success - POST /api/v2/login {"name":"admin", "pass": "0000"} + POST /api/v2/login {"name":"admin", "pass": "Lrlq6si6%GUvok$B"} Integer response status 200 output $.token diff --git a/ft/resource/api.resource b/ft/resource/api.resource index b762a3e7..0d344df5 100644 --- a/ft/resource/api.resource +++ b/ft/resource/api.resource @@ -53,7 +53,7 @@ Check Response Status Integer response status ${status} LOGIN - POST /api/v2/login {"name": "admin", "pass":"0000"} + POST /api/v2/login {"name": "admin", "pass":"Lrlq6si6%GUvok$B"} Integer response status 200 diff --git a/plugins/restful/normal_handle.c b/plugins/restful/normal_handle.c index 4a2b8b1f..e783ccda 100644 --- a/plugins/restful/normal_handle.c +++ b/plugins/restful/normal_handle.c @@ -50,7 +50,7 @@ void handle_login(nng_aio *aio) aio, neu_json_login_req_t, neu_json_decode_login_req, { neu_json_login_resp_t login_resp = { 0 }; char * name = "admin"; - char * password = "0000"; + char * password = "Lrlq6si6%GUvok$B"; if (strcmp(req->name, name) == 0 && strcmp(req->pass, password) == 0) {