diff --git a/services/run_capif_tests.sh b/services/run_capif_tests.sh index 06de2309e6fed0ebdf222bdca4908a16757ce178..8f9f414d4cb8d46ce3745f4f66e9ea1e33720da9 100755 --- a/services/run_capif_tests.sh +++ b/services/run_capif_tests.sh @@ -25,7 +25,8 @@ CAPIF_VAULT_PORT=8200 # CAPIF_VAULT_TOKEN=dev-only-token CAPIF_VAULT_TOKEN=read-ca-token -MOCK_SERVER_URL=http://192.168.0.119:9090 + +MOCK_SERVER_URL=http://192.168.0.11:9090 echo "CAPIF_HOSTNAME = $CAPIF_HOSTNAME" diff --git a/tests/resources/common.resource b/tests/resources/common.resource index d02891d686a2482b00eab740bd594e6cd957ede5..1be4429284412230bbb6c159de2bee021307b42c 100644 --- a/tests/resources/common.resource +++ b/tests/resources/common.resource @@ -32,7 +32,7 @@ ${CAPIF_CALLBACK_PORT} 8086 ${REGISTER_ADMIN_USER} admin ${REGISTER_ADMIN_PASSWORD} password123 -${MOCK_SERVER_URL} http://192.168.0.14:9090 +${MOCK_SERVER_URL} ${DISCOVER_URL} /service-apis/v1/allServiceAPIs?api-invoker-id= @@ -91,33 +91,13 @@ Test ${TEST NAME} Currently Not Supported Log Test "${TEST NAME}" Currently not supported WARN Skip Test "${TEST NAME}" Currently not supported -Start Mock server - Log Starting mock Server for Robot Framework. - - # Run Process pip3 install -r /opt/robot-tests/tests/libraries/mock_server/requirements.txt - ${server_process}= Start Process python3 /opt/robot-tests/tests/libraries/mock_server/mock_server.py shell=True - # Log PID: ${server_process.pid} - Log output: ${server_process.stdout} - - Sleep 5m - Create Session mockserver ${MOCK_SERVER_URL} - - ${endpoint}= Set Variable /testing - - ${json}= Create Dictionary events="SERVICE_API_INVOCATION_SUCCESS" subscriptionId="255545008cd3937f5554a3651bbfb9" - - ${resp}= POST On Session - ... mockserver - ... ${endpoint} - ... json=${json} - ... expected_status=any - ... verify=False - - ${result}= Terminate Process ${server_process} - Check Mock Server Log Checking mock Server for Robot Framework. + IF "${MOCK_SERVER_URL}" == "" + Fail Mock Server Url is not setup on Tests execution, check MOCK_SERVER_URL variable mockserver-not-ready + END + Create Session mockserver ${MOCK_SERVER_URL} ${endpoint}= Set Variable /requests_list @@ -128,7 +108,7 @@ Check Mock Server ... expected_status=any ... verify=False - Status Should Be 200 ${resp} + Status Should Be 200 ${resp} Mock Server response is not 200 OK at ${MOCK_SERVER_URL}, check server status. Clean Mock Server Log Checking mock Server for Robot Framework. diff --git a/tools/robot/Dockerfile b/tools/robot/Dockerfile index 261b1e45533b144b76579d6756efdb6d32057006..5cdc3cf4222a8a49afa8e7144bdca38fe4ec3d6d 100644 --- a/tools/robot/Dockerfile +++ b/tools/robot/Dockerfile @@ -64,18 +64,6 @@ RUN python3.10 -m venv /opt/venv ENV PLAYWRIGHT_BROWSERS_PATH=$HOME/pw-browsers -# Instalación de nvm y node a la última versión -# RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash -# # RUN source /root/.bashrc -# # RUN export NVM_DIR="$HOME/.nvm" \ -# # [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm \ -# # [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion - -# RUN nvm install node -# # RUN npx playwright install -# RUN yes|npx playwright install-deps - - ADD basicRequirements.txt /root/ ADD basicRobotInstall.sh /root/ diff --git a/tools/robot/basicRequirements.txt b/tools/robot/basicRequirements.txt index 282a034af442c92c2f6120babb03df7290ece387..aa3e60e0f55ee408cb29605ef29446b3dd075d4f 100644 --- a/tools/robot/basicRequirements.txt +++ b/tools/robot/basicRequirements.txt @@ -71,7 +71,6 @@ requests==2.28.1 rfc3987==1.3.8 robotframework==7.0 robotframework-archivelibrary == 0.4.2 -robotframework-browser==18.3.0 robotframework-httpctrl==0.3.1 robotframework-lint==1.1 robotframework-mongodb-library==3.2 diff --git a/tools/robot/basicRobotInstall.sh b/tools/robot/basicRobotInstall.sh index ba660105c18a4a6a8c3a15dcd844cd404a01a535..ae0bd6bd8b1bdedccc34b4d6152bffc8bb5f467b 100644 --- a/tools/robot/basicRobotInstall.sh +++ b/tools/robot/basicRobotInstall.sh @@ -1,14 +1,6 @@ #!/bin/bash echo "Installing basic software related with robotFramework" -source /opt/venv/bin/activate; +source /opt/venv/bin/activate pip install --upgrade pip -curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash -source /root/.bashrc -nvm install node -yes|npx playwright install-deps pip install -r $1 -rfbrowser clean-node -rfbrowser init --skip-browsers -npx playwright install -npx playwright install-deps echo "Robot framework installed"