blob: 0bcdcf2a26f67171fdce8d32d56f6c2c7e17526d [file] [log] [blame]
Aleksandra Maciaga6def5972020-02-20 09:42:03 +01001*** Settings ***
2
Aleksandra Maciaga93f9ea42020-03-03 13:38:58 +01003Documentation AAF Cert Service API test case scenarios
Aleksandra Maciaga6def5972020-02-20 09:42:03 +01004Library RequestsLibrary
5Resource ./resources/cert-service-keywords.robot
6
7Suite Setup Create sessions
8
9*** Test Cases ***
10
Aleksandra Maciaga93f9ea42020-03-03 13:38:58 +010011Health Check
Aleksandra Maciaga6def5972020-02-20 09:42:03 +010012 [Tags] AAF-CERT-SERVICE
Aleksandra Maciaga93f9ea42020-03-03 13:38:58 +010013 [Documentation] Service is up and running
Aleksandra Maciaga6def5972020-02-20 09:42:03 +010014 Run Healthcheck
15
Aleksandra Maciaga93f9ea42020-03-03 13:38:58 +010016Reload Configuration
Aleksandra Maciaga8d762b12020-02-24 14:24:42 +010017 [Tags] AAF-CERT-SERVICE
Aleksandra Maciaga93f9ea42020-03-03 13:38:58 +010018 [Documentation] Configuration was changed
Aleksandra Maciaga8d762b12020-02-24 14:24:42 +010019 Send Post Request And Validate Response /actuator/refresh 200
20
Aleksandra Maciaga93f9ea42020-03-03 13:38:58 +010021Generate Certicicate For CA Name
Aleksandra Maciaga6def5972020-02-20 09:42:03 +010022 [Tags] AAF-CERT-SERVICE
Aleksandra Maciaga93f9ea42020-03-03 13:38:58 +010023 [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 Maciaga8d762b12020-02-24 14:24:42 +010025
Aleksandra Maciaga93f9ea42020-03-03 13:38:58 +010026Report Not Found Error When Path Is Not Valid
Aleksandra Maciaga8d762b12020-02-24 14:24:42 +010027 [Tags] AAF-CERT-SERVICE
Aleksandra Maciaga93f9ea42020-03-03 13:38:58 +010028 [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 Maciaga8d762b12020-02-24 14:24:42 +010030
Aleksandra Maciaga93f9ea42020-03-03 13:38:58 +010031Report Bad Request Error When Header Is Missing
Aleksandra Maciaga8d762b12020-02-24 14:24:42 +010032 [Tags] AAF-CERT-SERVICE
Aleksandra Maciaga93f9ea42020-03-03 13:38:58 +010033 [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 Maciaga6def5972020-02-20 09:42:03 +010035
Aleksandra Maciaga93f9ea42020-03-03 13:38:58 +010036Report Bad Request Error When CSR Is Not Valid
Aleksandra Maciaga6def5972020-02-20 09:42:03 +010037 [Tags] AAF-CERT-SERVICE
Aleksandra Maciaga93f9ea42020-03-03 13:38:58 +010038 [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 Maciaga6def5972020-02-20 09:42:03 +010040
Aleksandra Maciaga93f9ea42020-03-03 13:38:58 +010041Report Bad Request Error When PK Is Not Valid
Aleksandra Maciaga6def5972020-02-20 09:42:03 +010042 [Tags] AAF-CERT-SERVICE
Aleksandra Maciaga93f9ea42020-03-03 13:38:58 +010043 [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