implement feature to generate random test data
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
75
permissions-test.json
Normal file
75
permissions-test.json
Normal file
@@ -0,0 +1,75 @@
|
||||
{
|
||||
"name": "CBS permissions 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/admin/permissions",
|
||||
"method": "GET",
|
||||
"description": "get list of permissions",
|
||||
"expect": {
|
||||
"header": {
|
||||
"contains": {
|
||||
"http_status": "200"
|
||||
}
|
||||
},
|
||||
"body": {
|
||||
"hasKeys": ["permissionId"],
|
||||
"contains": {
|
||||
"message": "success"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"test3": {
|
||||
"path": "/api/admin/permission/add",
|
||||
"method": "POST",
|
||||
"description": "create new permission",
|
||||
"body": {
|
||||
"Description": "Readonly access to default safe",
|
||||
"safeId": 1,
|
||||
"userId": 2,
|
||||
"readOnly": true
|
||||
},
|
||||
"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%"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user