add feature to disable test case
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-01-09 15:29:13 +11:00
parent b2519287ef
commit a31b01af4d
6 changed files with 204 additions and 15 deletions

View File

@@ -76,12 +76,133 @@
}
}
}
},
},
"test5": {
"path": "/api/admin/user/delete",
"method": "POST",
"description": "try to delete non-existing user account",
"body": {
"userName": "test"
},
"expect": {
"header": {
"contains": {
"http_status": "400"
}
},
"body": {
"contains": {
"error": "attempt to delete non-existing username"
}
}
}
},
"test10": {
"path": "/api/admin/unlock",
"disabled": true,
"method": "POST",
"description": "provide unlock key",
"body": {
"secretKey": "Example32ByteSecretKey0123456789"
},
"expect": {
"header": {
"contains": {
"http_status": "200"
}
}
}
},
"test11": {
"path": "/api/admin/unlock",
"disabled": true,
"method": "POST",
"description": "repeat provide unlock key",
"body": {
"secretKey": "Example32ByteSecretKey0123456789"
},
"expect": {
"header": {
"contains": {
"http_status": "400"
}
}
}
},
"test20": {
"path": "/api/secret/list",
"disabled": false,
"method": "GET",
"description": "List secrets",
"header": {
"Authorization": "Bearer %ACCESS_TOKEN%"
},
"expect": {
"header": {
"contains": {
"http_status": "200"
}
}
}
},
"test21": {
"path": "/api/secret/retrieve",
"method": "POST",
"description": "get existing secret",
"body": {
"deviceName": "adcp01.cdc.home",
"deviceCategory": "windows-server",
"userName": "dummy@cdc.home"
},
"expect": {
"header": {
"contains": {
"http_status": "200"
}
}
}
},
"test22": {
"path": "/api/secret/update",
"method": "POST",
"description": "update existing secret",
"body": {
"deviceName": "adcp01.cdc.home",
"deviceCategory": "windows-server",
"userName": "dummy@cdc.home",
"secretValue": "TheAlphabet29"
},
"expect": {
"header": {
"contains": {
"http_status": "200"
}
}
}
},
"test23": {
"path": "/api/secret/delete",
"method": "POST",
"description": "delete existing secret",
"body": {
"deviceName": "adcp01.cdc.home",
"deviceCategory": "windows-server",
"userName": "dummy@cdc.home"
},
"expect": {
"header": {
"contains": {
"http_status": "200"
}
}
}
},
"test24": {
"path": "/api/secret/store",
"method": "POST",
"description": "store new secret",
"body": {
"safeId": 1,
"deviceName": "adcp01.cdc.home",
"deviceCategory": "windows-server",
"userName": "dummy@cdc.home",
@@ -94,20 +215,14 @@
}
}
}
},
"test99": {
"path": "/api/secret/list",
"method": "GET",
"description": "List secrets",
"header": {
"Authorization": "Bearer %ACCESS_TOKEN%"
},
},
"test25": {
"path": "/api/secret/retrieve",
"method": "POST",
"description": "test retrieving the new secret",
"body": {
"Hostname":"host999.cdc.home",
"BootTypeUefi":true,
"parent": {
"childKey": "childValue"
}
"deviceName": "adcp01.cdc.home",
"userName": "dummy@cdc.home"
},
"expect": {
"header": {
@@ -116,7 +231,7 @@
}
}
}
}
}
},
"url": "https://10.63.39.130:8443",
"insecure": true,