blob: ad35826333f0310342b0f6febf08ac5a6a7c8357 [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 Maciagaf6300682020-03-04 17:11:30 +010014 Run health check
Aleksandra Maciaga6def5972020-02-20 09:42:03 +010015
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 Maciagaf6300682020-03-04 17:11:30 +010019 Send Get Request And Validate Response /reload 200
Aleksandra Maciaga8d762b12020-02-24 14:24:42 +010020
Aleksandra Maciagaf6300682020-03-04 17:11:30 +010021Generate Certificate In RA Mode For CA Name
Aleksandra Maciaga6def5972020-02-20 09:42:03 +010022 [Tags] AAF-CERT-SERVICE
Aleksandra Maciagaf6300682020-03-04 17:11:30 +010023 [Documentation] Send request to ${CERT_SERVICE_ENDPOINT}/${RA_CA_NAME} endpoint and expect 200
24 Send Get Request with Header And Expect Success ${CERT_SERVICE_ENDPOINT}/${RA_CA_NAME} ${VALID_RA_CSR_FILE} ${VALID_RA_PK_FILE}
Aleksandra Maciaga8d762b12020-02-24 14:24:42 +010025
Aleksandra Maciagaf6300682020-03-04 17:11:30 +010026Report Not Found Error When Path To Service 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
Aleksandra Maciagaf6300682020-03-04 17:11:30 +010029 Send Get Request with Header And Expect Error ${CERT_SERVICE_ENDPOINT}/ ${VALID_CLIENT_CSR_FILE} ${VALID_CLIENT_PK_FILE} 404
Aleksandra Maciaga8d762b12020-02-24 14:24:42 +010030
Aleksandra Maciagaf6300682020-03-04 17:11:30 +010031Report Bad Request Error When Header Is Missing In Request
Aleksandra Maciaga8d762b12020-02-24 14:24:42 +010032 [Tags] AAF-CERT-SERVICE
Aleksandra Maciagaf6300682020-03-04 17:11:30 +010033 [Documentation] Send request without header to ${CERT_SERVICE_ENDPOINT}/${CLIENT_CA_NAME} endpoint and expect 400
34 Send Get Request And Validate Response ${CERT_SERVICE_ENDPOINT}/${CLIENT_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 Maciagaf6300682020-03-04 17:11:30 +010038 [Documentation] Send request to ${CERT_SERVICE_ENDPOINT}/${CLIENT_CA_NAME} endpoint and expect 400
39 Send Get Request with Header And Expect Error ${CERT_SERVICE_ENDPOINT}/${CLIENT_CA_NAME} ${INVALID_CSR_FILE} ${VALID_CLIENT_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 Maciagaf6300682020-03-04 17:11:30 +010043 [Documentation] Send request to ${CERT_SERVICE_ENDPOINT}/${CLIENT_CA_NAME} endpoint and expect 400
44 Send Get Request with Header And Expect Error ${CERT_SERVICE_ENDPOINT}/${CLIENT_CA_NAME} ${VALID_CLIENT_CSR_FILE} ${INVALID_PK_FILE} 400