Commit 78fd87c5 authored by Jorge Moratinos's avatar Jorge Moratinos
Browse files

modify robot docker image

parent c5507ba9
Loading
Loading
Loading
Loading
Loading
+44 −0
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ Library XML
Resource            /opt/robot-tests/tests/resources/common/basicRequests.robot
Resource            ../../resources/common.resource


Suite Teardown      Reset Testing Environment
Test Setup          Reset Testing Environment

@@ -137,3 +138,46 @@ Deletes an individual CAPIF Event Subscription with invalid SubscriptionId
    ...    title=Unauthorized
    ...    detail=User not authorized
    ...    cause=You are not the owner of this resource

Prueba JMS
    [Tags]    jms-1
    # Log    "Prueba 1"
    # Wait For Request
    # Create a log entry
    # [Tags]    capif_api_logging_service-1

    # Register APF
    ${register_user_info}=    Provider Default Registration

    # Publish one api
    Publish Service Api    ${register_user_info}

    # Register INVOKER
    ${register_user_info_invoker}    ${url}    ${request_body}=    Invoker Default Onboarding

    ${discover_response}=    Get Request Capif
    ...    ${DISCOVER_URL}${register_user_info_invoker['api_invoker_id']}
    ...    server=${CAPIF_HTTPS_URL}
    ...    verify=ca.crt
    ...    username=${INVOKER_USERNAME}

    ${api_ids}    ${api_names}=    Get Api Ids And Names From Discover Response    ${discover_response}

    # Create Log Entry
    ${request_body}=    Create Log Entry
    ...    ${register_user_info['aef_id']}
    ...    ${register_user_info_invoker['api_invoker_id']}
    ...    ${api_ids}
    ...    ${api_names}
    ...    '200'
    ${resp}=    Post Request Capif
    ...    /api-invocation-logs/v1/${register_user_info['aef_id']}/logs
    ...    json=${request_body}
    ...    server=${CAPIF_HTTPS_URL}
    ...    verify=ca.crt
    ...    username=${AEF_PROVIDER_USERNAME}

    # Check Results
    Check Response Variable Type And Values    ${resp}    201    InvocationLog
    ${resource_url}=    Check Location Header    ${resp}    ${LOCATION_LOGGING_RESOURCE_REGEX}
+1 −7
Original line number Diff line number Diff line
# Requirements file for tests.
robotframework-mongodb-library==3.2
requests==2.28.1
configparser==5.3.0
redis==4.3.4
rfc3987==1.3.8
robotframework-httpctrl
robotframework-archivelibrary == 0.4.2
+20 −4
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ VOLUME $ROBOT_RESULTS_DIRECTORY
WORKDIR $ROBOT_DIRECTORY

ENV DEBIAN_FRONTEND=noninteractive
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections

# Install dependencies
RUN apt-get update
@@ -50,16 +51,31 @@ RUN apt-get install -y --no-install-recommends \
    python2.7-dev \
    libssl-dev \
    libldap2-dev libsasl2-dev ldap-utils slapd tox lcov valgrind \
    tshark
    tshark \
    nodejs \
    npm

RUN add-apt-repository ppa:deadsnakes/ppa
RUN add-apt-repository -y ppa:deadsnakes/ppa
RUN apt-get update
RUN apt-get install -y --fix-missing python3.10 python3.10-venv python3.10-dev


RUN mkdir /opt/venv
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/
+7 −6
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ certifi==2021.10.8
cffi==1.15.1
chardet==5.0.0
charset-normalizer==2.0.12
click==8.0.1
click==8.1.7
configparser==5.3.0
cookiecutter==2.1.1
coverage==4.5.4
@@ -26,7 +26,6 @@ exceptiongroup==1.0.0rc9
filelock==3.8.0
flake8==3.9.2
h11==0.14.0
robotframework-httpctrl==0.3.1
idna==3.4
iniconfig==1.1.1
invoke==1.6.0
@@ -69,10 +68,12 @@ redis==4.3.4
rellu==0.7
requests==2.28.1
rfc3987==1.3.8
robotframework==6.0
robotframework==7.0
robotframework-browser==18.3.0
robotframework-httpctrl==0.3.1
robotframework-lint==1.1
robotframework-mongodb-library==3.2
robotframework-pythonlibcore==3.0.0
robotframework-pythonlibcore==4.4.1
robotframework-requests==0.9.3
robotframework-seleniumlibrary==6.0.0
robotframework-sshlibrary==3.8.0
@@ -91,11 +92,11 @@ tox==3.26.0
tqdm==4.64.1
trio==0.22.0
trio-websocket==0.9.2
typing-extensions==3.10.0.2
typing-extensions==4.11.0
urllib3==1.26.12
virtualenv==20.16.5
watchdog==0.9.0
webdrivermanager==0.10.0
wrapt==1.14.1
wrapt==1.15.0
wsproto==1.2.0
xlrd==2.0.1
 No newline at end of file
+9 −2
Original line number Diff line number Diff line
@@ -2,6 +2,13 @@
echo "Installing basic software related with robotFramework"
source /opt/venv/bin/activate; 
pip install --upgrade pip
pip install --upgrade robotframework;
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"