All checks were successful
continuous-integration/drone/push Build is passing
120 lines
3.4 KiB
JSON
120 lines
3.4 KiB
JSON
{
|
|
"name": "CBS safes testing",
|
|
"testCases": {
|
|
"test1": {
|
|
"path": "/api/login",
|
|
"method": "POST",
|
|
"description": "Perform login",
|
|
"body": {
|
|
"username": "Administrator",
|
|
"password": "Password123"
|
|
},
|
|
"expect": {
|
|
"header": {
|
|
"contains": {
|
|
"http_status": "200",
|
|
"Content-Type": "application/json"
|
|
}
|
|
},
|
|
"body": {
|
|
"hasKeys": ["access_token"]
|
|
}
|
|
}
|
|
},
|
|
"test2": {
|
|
"path": "/api/safe/list",
|
|
"method": "GET",
|
|
"description": "get user allowed safe listing",
|
|
"expect": {
|
|
"header": {
|
|
"contains": {
|
|
"http_status": "200"
|
|
}
|
|
},
|
|
"body": {
|
|
"hasKeys": ["safeName"],
|
|
"contains": {
|
|
"message": "success"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"test3": {
|
|
"path": "/api/admin/safe/add",
|
|
"method": "POST",
|
|
"description": "create new safe",
|
|
"body": {
|
|
"safeName": "API test created safe"
|
|
},
|
|
"expect": {
|
|
"header": {
|
|
"contains": {
|
|
"http_status": "200"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"test4": {
|
|
"path": "/api/admin/safe/add",
|
|
"method": "POST",
|
|
"description": "create new safe",
|
|
"body": {
|
|
"safeName": "API test created second safe"
|
|
},
|
|
"expect": {
|
|
"header": {
|
|
"contains": {
|
|
"http_status": "200"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"test5": {
|
|
"path": "/api/admin/safe/listall",
|
|
"method": "GET",
|
|
"description": "get all defined safe listing",
|
|
"expect": {
|
|
"header": {
|
|
"contains": {
|
|
"http_status": "200"
|
|
}
|
|
},
|
|
"body": {
|
|
"hasKeys": ["safeName"],
|
|
"contains": {
|
|
"message": "success"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"test6": {
|
|
"path": "/api/admin/safe/delete",
|
|
"method": "POST",
|
|
"description": "get all defined safe listing",
|
|
"body": {
|
|
"safeName": "API test created safe"
|
|
},
|
|
"expect": {
|
|
"header": {
|
|
"contains": {
|
|
"http_status": "200"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"url": "https://10.63.39.130:8443",
|
|
"insecure": true,
|
|
"header": {
|
|
"Content-Type": "application/json",
|
|
"Authorization": "Bearer %ACCESS_TOKEN%"
|
|
},
|
|
"capture": {
|
|
"test1": {
|
|
"body": {
|
|
"access_token": "%ACCESS_TOKEN%"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|