Files
apitester/group-test.json
Nathan Coad 2afdacaa78
All checks were successful
continuous-integration/drone/push Build is passing
implement feature to generate random test data
2024-01-11 16:14:00 +11:00

108 lines
3.0 KiB
JSON

{
"name": "CBS group 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/groups",
"method": "GET",
"description": "get group listing",
"expect": {
"header": {
"contains": {
"http_status": "200"
}
},
"body": {
"hasKeys": ["groupName"],
"contains": {
"message": "success"
}
}
}
},
"test3": {
"path": "/api/admin/group/add",
"disabled": true,
"method": "POST",
"description": "add new local group",
"body": {
"groupName": "test local group",
"ldapGroup": false
},
"expect": {
"header": {
"contains": {
"http_status": "200"
}
}
}
},
"test4": {
"path": "/api/admin/groups",
"method": "GET",
"description": "get group listing again",
"expect": {
"header": {
"contains": {
"http_status": "200"
}
},
"body": {
"hasKeys": ["groupName"],
"contains": {
"message": "success"
}
}
}
},
"test5": {
"path": "/api/admin/group/delete",
"method": "POST",
"description": "remove new local group",
"body": {
"groupName": "test local group",
"ldapGroup": false
},
"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%"
}
}
}
}