Aleksandra Maciaga | 6def597 | 2020-02-20 09:42:03 +0100 | [diff] [blame] | 1 | *** Settings *** |
| 2 | |
Aleksandra Maciaga | 93f9ea4 | 2020-03-03 13:38:58 +0100 | [diff] [blame] | 3 | Documentation AAF Cert Service API test case scenarios |
Aleksandra Maciaga | 6def597 | 2020-02-20 09:42:03 +0100 | [diff] [blame] | 4 | Library RequestsLibrary |
| 5 | Resource ./resources/cert-service-keywords.robot |
| 6 | |
| 7 | Suite Setup Create sessions |
| 8 | |
| 9 | *** Test Cases *** |
| 10 | |
Aleksandra Maciaga | 93f9ea4 | 2020-03-03 13:38:58 +0100 | [diff] [blame] | 11 | Health Check |
Aleksandra Maciaga | 6def597 | 2020-02-20 09:42:03 +0100 | [diff] [blame] | 12 | [Tags] AAF-CERT-SERVICE |
Aleksandra Maciaga | 93f9ea4 | 2020-03-03 13:38:58 +0100 | [diff] [blame] | 13 | [Documentation] Service is up and running |
Aleksandra Maciaga | 6def597 | 2020-02-20 09:42:03 +0100 | [diff] [blame] | 14 | Run Healthcheck |
| 15 | |
Aleksandra Maciaga | 93f9ea4 | 2020-03-03 13:38:58 +0100 | [diff] [blame] | 16 | Reload Configuration |
Aleksandra Maciaga | 8d762b1 | 2020-02-24 14:24:42 +0100 | [diff] [blame] | 17 | [Tags] AAF-CERT-SERVICE |
Aleksandra Maciaga | 93f9ea4 | 2020-03-03 13:38:58 +0100 | [diff] [blame] | 18 | [Documentation] Configuration was changed |
Aleksandra Maciaga | 8d762b1 | 2020-02-24 14:24:42 +0100 | [diff] [blame] | 19 | Send Post Request And Validate Response /actuator/refresh 200 |
| 20 | |
Aleksandra Maciaga | 93f9ea4 | 2020-03-03 13:38:58 +0100 | [diff] [blame] | 21 | Generate Certicicate For CA Name |
Aleksandra Maciaga | 6def597 | 2020-02-20 09:42:03 +0100 | [diff] [blame] | 22 | [Tags] AAF-CERT-SERVICE |
Aleksandra Maciaga | 93f9ea4 | 2020-03-03 13:38:58 +0100 | [diff] [blame] | 23 | [Documentation] Send request to ${CERT_SERVICE_ENDPOINT}/${CA_NAME} endpoint and expect 200 |
| 24 | Send Get Request with Header And Validate Response ${CERT_SERVICE_ENDPOINT}/${CA_NAME} ${VALID_CSR_FILE} ${VALID_PK_FILE} 200 |
Aleksandra Maciaga | 8d762b1 | 2020-02-24 14:24:42 +0100 | [diff] [blame] | 25 | |
Aleksandra Maciaga | 93f9ea4 | 2020-03-03 13:38:58 +0100 | [diff] [blame] | 26 | Report Not Found Error When Path Is Not Valid |
Aleksandra Maciaga | 8d762b1 | 2020-02-24 14:24:42 +0100 | [diff] [blame] | 27 | [Tags] AAF-CERT-SERVICE |
Aleksandra Maciaga | 93f9ea4 | 2020-03-03 13:38:58 +0100 | [diff] [blame] | 28 | [Documentation] Send request to ${CERT_SERVICE_ENDPOINT}/ endpoint and expect 404 |
| 29 | Send Get Request with Header And Validate Response ${CERT_SERVICE_ENDPOINT}/ ${VALID_CSR_FILE} ${VALID_PK_FILE} 404 |
Aleksandra Maciaga | 8d762b1 | 2020-02-24 14:24:42 +0100 | [diff] [blame] | 30 | |
Aleksandra Maciaga | 93f9ea4 | 2020-03-03 13:38:58 +0100 | [diff] [blame] | 31 | Report Bad Request Error When Header Is Missing |
Aleksandra Maciaga | 8d762b1 | 2020-02-24 14:24:42 +0100 | [diff] [blame] | 32 | [Tags] AAF-CERT-SERVICE |
Aleksandra Maciaga | 93f9ea4 | 2020-03-03 13:38:58 +0100 | [diff] [blame] | 33 | [Documentation] Send request without header to ${CERT_SERVICE_ENDPOINT}/${CA_NAME} endpoint and expect 400 |
| 34 | Send Get Request And Validate Response ${CERT_SERVICE_ENDPOINT}/${CA_NAME} 400 |
Aleksandra Maciaga | 6def597 | 2020-02-20 09:42:03 +0100 | [diff] [blame] | 35 | |
Aleksandra Maciaga | 93f9ea4 | 2020-03-03 13:38:58 +0100 | [diff] [blame] | 36 | Report Bad Request Error When CSR Is Not Valid |
Aleksandra Maciaga | 6def597 | 2020-02-20 09:42:03 +0100 | [diff] [blame] | 37 | [Tags] AAF-CERT-SERVICE |
Aleksandra Maciaga | 93f9ea4 | 2020-03-03 13:38:58 +0100 | [diff] [blame] | 38 | [Documentation] Send request to ${CERT_SERVICE_ENDPOINT}/${CA_NAME} endpoint and expect 400 |
| 39 | Send Get Request with Header And Validate Response ${CERT_SERVICE_ENDPOINT}/${CA_NAME} ${INVALID_CSR_FILE} ${VALID_PK_FILE} 400 |
Aleksandra Maciaga | 6def597 | 2020-02-20 09:42:03 +0100 | [diff] [blame] | 40 | |
Aleksandra Maciaga | 93f9ea4 | 2020-03-03 13:38:58 +0100 | [diff] [blame] | 41 | Report Bad Request Error When PK Is Not Valid |
Aleksandra Maciaga | 6def597 | 2020-02-20 09:42:03 +0100 | [diff] [blame] | 42 | [Tags] AAF-CERT-SERVICE |
Aleksandra Maciaga | 93f9ea4 | 2020-03-03 13:38:58 +0100 | [diff] [blame] | 43 | [Documentation] Send request to ${CERT_SERVICE_ENDPOINT}/${CA_NAME} endpoint and expect 400 |
| 44 | Send Get Request with Header And Validate Response ${CERT_SERVICE_ENDPOINT}/${CA_NAME} ${VALID_CSR_FILE} ${INVALID_PK_FILE} 400 |