daaa07ca46bf2a61a98f726780d98a6fe35c8718
[integration/csit.git] / tests / aaf / certservice / cert-service-test.robot
1 *** Settings ***
2
3 Documentation     AAF test case scenarios
4 Library               RequestsLibrary
5 Resource          ./resources/cert-service-keywords.robot
6
7 Suite Setup       Create sessions
8
9 *** Test Cases ***
10
11 AAF Cert Service API Health Check
12     [Tags]      AAF-CERT-SERVICE
13     [Documentation]   Run healthcheck
14     Run Healthcheck
15
16 AAF Cert Service API Reload Configuration
17     [Tags]      AAF-CERT-SERVICE
18     [Documentation]   Reload configuration
19     Send Post Request And Validate Response  /actuator/refresh  200
20
21 AAF Cert Service API Send Valid CSR and Valid PK
22     [Tags]      AAF-CERT-SERVICE
23     [Documentation]  Send request to ${CERT_PATH} endpoint and expect 200
24     Send Get Request with Header And Validate Response  ${CERT_PATH}  ${VALID_CSR_FILE}  ${VALID_PK_FILE}  200
25
26 AAF Cert Service API Send Valid CSR and Valid PK to Wrong Path
27     [Tags]      AAF-CERT-SERVICE
28     [Documentation]  Send request to /v1/certificate/ endpoint and expect 404
29     Send Get Request with Header And Validate Response  /v1/certificate/  ${VALID_CSR_FILE}  ${VALID_PK_FILE}  404
30
31 AAF Cert Service API Send Request without Header
32     [Tags]      AAF-CERT-SERVICE
33     [Documentation]  Send request without header to ${CERT_PATH} endpoint and expect 400
34     Send Get Request And Validate Response  ${CERT_PATH}  400
35
36 AAF Cert Service API Send Invalid CSR and Valid PK
37     [Tags]      AAF-CERT-SERVICE
38     [Documentation]  Send request to ${CERT_PATH} endpoint and expect 400
39     Send Get Request with Header And Validate Response  ${CERT_PATH}  ${INVALID_CSR_FILE}  ${VALID_PK_FILE}  400
40
41 AAF Cert Service API Send Valid CSR and Invalid PK
42     [Tags]      AAF-CERT-SERVICE
43     [Documentation]  Send request to ${CERT_PATH} endpoint and expect 400
44     Send Get Request with Header And Validate Response  ${CERT_PATH}  ${VALID_CSR_FILE}  ${INVALID_PK_FILE}  400