Files
apitester/tests.json
Nathan Coad e1a1e5a49d
Some checks failed
continuous-integration/drone/push Build is failing
implement hasKeys check
2024-01-03 11:55:56 +11:00

59 lines
1.5 KiB
JSON

{
"name": "CBS test cases",
"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/secret/list",
"method": "GET",
"description": "List secrets",
"header": {
"Authorization": "Bearer %ACCESS_TOKEN%"
},
"body": {
"Hostname":"host999.cdc.home",
"BootTypeUefi":true,
"parent": {
"childKey": "childValue"
}
},
"expect": {
"header": {
"contains": {
"http_status": "200"
}
}
}
}
},
"url": "https://10.63.39.130:8443",
"insecure": true,
"header": {
"Content-Type": "application/json"
},
"capture": {
"test1": {
"body": {
"access_token": "%ACCESS_TOKEN%"
}
}
}
}