improve body contains check
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-01-03 15:42:25 +11:00
parent af7ee7f3c1
commit b2519287ef
8 changed files with 148 additions and 62 deletions

View File

@@ -22,6 +22,80 @@
}
},
"test2": {
"path": "/api/admin/user/register",
"method": "POST",
"description": "register user account",
"header": {
"Authorization": "Bearer %ACCESS_TOKEN%"
},
"body": {
"username": "test",
"password": "test"
},
"expect": {
"header": {
"contains": {
"http_status": "200"
}
},
"body": {
"contains": {
"message": "registration success"
}
}
}
},
"test3": {
"path": "/api/admin/users",
"method": "GET",
"description": "get user account listing",
"expect": {
"body": {
"contains": {
"userName": "test"
}
}
}
},
"test4": {
"path": "/api/admin/user/delete",
"method": "POST",
"description": "delete user account",
"body": {
"userName": "test"
},
"expect": {
"header": {
"contains": {
"http_status": "200"
}
},
"body": {
"contains": {
"message": "user deletion success"
}
}
}
},
"test10": {
"path": "/api/secret/store",
"method": "POST",
"description": "store new secret",
"body": {
"deviceName": "adcp01.cdc.home",
"deviceCategory": "windows-server",
"userName": "dummy@cdc.home",
"secretValue": "TheAlphabet"
},
"expect": {
"header": {
"contains": {
"http_status": "200"
}
}
}
},
"test99": {
"path": "/api/secret/list",
"method": "GET",
"description": "List secrets",
@@ -47,7 +121,8 @@
"url": "https://10.63.39.130:8443",
"insecure": true,
"header": {
"Content-Type": "application/json"
"Content-Type": "application/json",
"Authorization": "Bearer %ACCESS_TOKEN%"
},
"capture": {
"test1": {