aboutsummaryrefslogtreecommitdiffstats
path: root/tests/aaf
diff options
context:
space:
mode:
authorkjaniak <kornel.janiak@nokia.com>2020-03-18 13:01:36 +0100
committerKornel Janiak <kornel.janiak@nokia.com>2020-03-20 08:33:15 +0000
commit25fac3a21f28662920fb5210c05f4dc36140769e (patch)
tree700f44218f297aaeae1cd3c599ec00616ffd16e0 /tests/aaf
parentf1903ee00a8d066d9e860e0a35e10f0948dfbc49 (diff)
Fix for proxy issues in local build
Change-Id: Iaf6105aa73d5cca381de212a3572259ff948aabf Issue-ID: AAF-1107 Signed-off-by: kjaniak <kornel.janiak@nokia.com>
Diffstat (limited to 'tests/aaf')
-rw-r--r--tests/aaf/certservice/cert-service-test.robot20
-rw-r--r--tests/aaf/certservice/resources/cert-service-keywords.robot4
-rw-r--r--tests/aaf/certservice/resources/cert-service-properties.robot7
3 files changed, 16 insertions, 15 deletions
diff --git a/tests/aaf/certservice/cert-service-test.robot b/tests/aaf/certservice/cert-service-test.robot
index 863d295f..f9fc0910 100644
--- a/tests/aaf/certservice/cert-service-test.robot
+++ b/tests/aaf/certservice/cert-service-test.robot
@@ -25,28 +25,28 @@ Check if application is ready
Generate Certificate In RA Mode For CA Name
[Tags] AAF-CERT-SERVICE
- [Documentation] Send request to ${CERT_SERVICE_ENDPOINT}/${RA_CA_NAME} endpoint and expect 200
- Send Get Request with Header And Expect Success ${CERT_SERVICE_ENDPOINT}/${RA_CA_NAME} ${VALID_RA_CSR_FILE} ${VALID_RA_PK_FILE}
+ [Documentation] Send request to ${CERT_SERVICE_ENDPOINT}${RA_CA_NAME} endpoint and expect 200
+ Send Get Request with Header And Expect Success ${CERT_SERVICE_ENDPOINT}${RA_CA_NAME} ${VALID_RA_CSR_FILE} ${VALID_RA_PK_FILE}
Report Not Found Error When Path To Service Is Not Valid
[Tags] AAF-CERT-SERVICE
- [Documentation] Send request to ${CERT_SERVICE_ENDPOINT}/ endpoint and expect 404
- Send Get Request with Header And Expect Error ${CERT_SERVICE_ENDPOINT}/ ${VALID_CLIENT_CSR_FILE} ${VALID_CLIENT_PK_FILE} 404
+ [Documentation] Send request to ${CERT_SERVICE_ENDPOINT} endpoint and expect 404
+ Send Get Request with Header And Expect Error ${CERT_SERVICE_ENDPOINT} ${VALID_CLIENT_CSR_FILE} ${VALID_CLIENT_PK_FILE} 404
Report Bad Request Error When Header Is Missing In Request
[Tags] AAF-CERT-SERVICE
- [Documentation] Send request without header to ${CERT_SERVICE_ENDPOINT}/${CLIENT_CA_NAME} endpoint and expect 400
- Send Get Request And Validate Response ${CERT_SERVICE_ENDPOINT}/${CLIENT_CA_NAME} 400
+ [Documentation] Send request without header to ${CERT_SERVICE_ENDPOINT}${CLIENT_CA_NAME} endpoint and expect 400
+ Send Get Request And Validate Response ${CERT_SERVICE_ENDPOINT}${CLIENT_CA_NAME} 400
Report Bad Request Error When CSR Is Not Valid
[Tags] AAF-CERT-SERVICE
- [Documentation] Send request to ${CERT_SERVICE_ENDPOINT}/${CLIENT_CA_NAME} endpoint and expect 400
- Send Get Request with Header And Expect Error ${CERT_SERVICE_ENDPOINT}/${CLIENT_CA_NAME} ${INVALID_CSR_FILE} ${VALID_CLIENT_PK_FILE} 400
+ [Documentation] Send request to ${CERT_SERVICE_ENDPOINT}${CLIENT_CA_NAME} endpoint and expect 400
+ Send Get Request with Header And Expect Error ${CERT_SERVICE_ENDPOINT}${CLIENT_CA_NAME} ${INVALID_CSR_FILE} ${VALID_CLIENT_PK_FILE} 400
Report Bad Request Error When PK Is Not Valid
[Tags] AAF-CERT-SERVICE
- [Documentation] Send request to ${CERT_SERVICE_ENDPOINT}/${CLIENT_CA_NAME} endpoint and expect 400
- Send Get Request with Header And Expect Error ${CERT_SERVICE_ENDPOINT}/${CLIENT_CA_NAME} ${VALID_CLIENT_CSR_FILE} ${INVALID_PK_FILE} 400
+ [Documentation] Send request to ${CERT_SERVICE_ENDPOINT}${CLIENT_CA_NAME} endpoint and expect 400
+ Send Get Request with Header And Expect Error ${CERT_SERVICE_ENDPOINT}${CLIENT_CA_NAME} ${VALID_CLIENT_CSR_FILE} ${INVALID_PK_FILE} 400
Cert Service Client successfully creates keystore and truststore
[Tags] AAF-CERT-SERVICE
diff --git a/tests/aaf/certservice/resources/cert-service-keywords.robot b/tests/aaf/certservice/resources/cert-service-keywords.robot
index e8576dd2..c70cfcf4 100644
--- a/tests/aaf/certservice/resources/cert-service-keywords.robot
+++ b/tests/aaf/certservice/resources/cert-service-keywords.robot
@@ -86,7 +86,7 @@ Send Post Request And Validate Response
Run Cert Service Client And Validate JKS File Creation And Client Exit Code
[Documentation] Run Cert Service Client Container And Validate Exit Code
[Arguments] ${env_file} ${expected_exit_code}
- ${exit_code}= Run Client Container ${DOCKER_CLIENT_IMAGE} ${CLIENT_CONTAINER_NAME} ${env_file} ${CERT_ADDRESS} ${CERT_SERVICE_NETWORK}
+ ${exit_code}= Run Client Container ${DOCKER_CLIENT_IMAGE} ${CLIENT_CONTAINER_NAME} ${env_file} ${CERT_SERVICE_ADDRESS}${CERT_SERVICE_ENDPOINT} ${CERT_SERVICE_NETWORK}
${can_open}= Can Open Keystore And Truststore With Pass ${CLIENT_CONTAINER_NAME}
Remove Client Container And Save Logs ${CLIENT_CONTAINER_NAME} positive_path
Should Be Equal As Strings ${exit_code} ${expected_exit_code} Client return: ${exitcode} exit code, but expected: ${expected_exit_code}
@@ -95,7 +95,7 @@ Run Cert Service Client And Validate JKS File Creation And Client Exit Code
Run Cert Service Client And Validate Http Response Code And Client Exit Code
[Documentation] Run Cert Service Client Container And Validate Exit Code
[Arguments] ${env_file} ${expected_api_response_code} ${expected_exit_code}
- ${exit_code}= Run Client Container ${DOCKER_CLIENT_IMAGE} ${CLIENT_CONTAINER_NAME} ${env_file} ${CERT_ADDRESS} ${CERT_SERVICE_NETWORK}
+ ${exit_code}= Run Client Container ${DOCKER_CLIENT_IMAGE} ${CLIENT_CONTAINER_NAME} ${env_file} ${CERT_SERVICE_ADDRESS}${CERT_SERVICE_ENDPOINT} ${CERT_SERVICE_NETWORK}
${can_find_API_response}= Can Find Api Response In Logs ${CLIENT_CONTAINER_NAME}
${api_response_code}= Get Api Response From Logs ${CLIENT_CONTAINER_NAME}
Remove Client Container And Save Logs ${CLIENT_CONTAINER_NAME} negative_path
diff --git a/tests/aaf/certservice/resources/cert-service-properties.robot b/tests/aaf/certservice/resources/cert-service-properties.robot
index 292ac37f..5fd2d8af 100644
--- a/tests/aaf/certservice/resources/cert-service-properties.robot
+++ b/tests/aaf/certservice/resources/cert-service-properties.robot
@@ -1,9 +1,10 @@
*** Variables ***
-${AAFCERT_URL} http://%{AAFCERT_IP}:8080
+${CERT_SERVICE_PORT} 8080
+${AAFCERT_URL} http://localhost:${cert_service_port}
${CLIENT_CA_NAME} Client
${RA_CA_NAME} RA
-${CERT_SERVICE_ENDPOINT} /v1/certificate
+${CERT_SERVICE_ENDPOINT} /v1/certificate/
${VALID_CLIENT_CSR_FILE} %{WORKSPACE}/tests/aaf/certservice/assets/valid_client.csr
${VALID_CLIENT_PK_FILE} %{WORKSPACE}/tests/aaf/certservice/assets/valid_client.pk
${VALID_RA_CSR_FILE} %{WORKSPACE}/tests/aaf/certservice/assets/valid_ra.csr
@@ -12,7 +13,7 @@ ${INVALID_CSR_FILE} %{WORKSPACE}/tests/aaf/certservice/asse
${INVALID_PK_FILE} %{WORKSPACE}/tests/aaf/certservice/assets/invalid.key
-${CERT_ADDRESS} ${AAFCERT_URL}/v1/certificate/
+${CERT_SERVICE_ADDRESS} http://%{AAFCERT_IP}:${cert_service_port}
${VALID_ENV_FILE} %{WORKSPACE}/tests/aaf/certservice/assets/valid_client_docker.env
${INVALID_ENV_FILE} %{WORKSPACE}/tests/aaf/certservice/assets/invalid_client_docker.env
${DOCKER_CLIENT_IMAGE} nexus3.onap.org:10001/onap/org.onap.aaf.certservice.aaf-certservice-client:latest