Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: robottests in docker #454

Open
wants to merge 1 commit into
base: dev_prozorro_2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
MODE=aboveThresholdUA

ROBOT_OPTIONS="--loglevel DEBUG -s planning --exitonfailure"
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
__pycache__/
*.py[cod]

.env
artifact*.yaml
reports/

# Distribution / packaging / buildout
/*.egg-info/
/.installed.cfg
Expand Down
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM ppodgorsek/robot-framework:latest

USER root
RUN dnf install -y git
COPY requirements.txt requirements.txt
RUN pip3 install --upgrade pip && pip install --no-cache-dir -r requirements.txt

USER ${ROBOT_UID}:${ROBOT_GID}


COPY /op_robot_tests/tests_files /opt/robotframework/tests

CMD ["sh","-c", "run-tests-in-virtual-screen.sh"]
13 changes: 13 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: '3.8'

services:
robot:
build:
context: .
dockerfile: Dockerfile
command: ["sh","-c", "run-tests-in-virtual-screen.sh"]
env_file:
- .env
volumes:
- ./op_robot_tests/tests_files:/opt/robotframework/tests
- ./reports:/opt/robotframework/reports
2 changes: 1 addition & 1 deletion op_robot_tests/tests_files/aboveThreshold_keywords.robot
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
*** Settings ***
Library ../tests_files/service_keywords.py
Library service_keywords.py
Library Collections
Resource keywords.robot
Resource resource.robot
Expand Down
2 changes: 1 addition & 1 deletion op_robot_tests/tests_files/base_keywords.robot
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
coding: utf-8
*** Settings ***
Library ../tests_files/service_keywords.py
Library service_keywords.py
Library Collections
Resource keywords.robot
Resource resource.robot
Expand Down
2 changes: 1 addition & 1 deletion op_robot_tests/tests_files/keywords.robot
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
coding: utf-8
*** Settings ***
Library ../tests_files/service_keywords.py
Library service_keywords.py
Library String
Library Collections
Library SeleniumLibrary
Expand Down
9 changes: 9 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Faker>=18.9.0
dpath==2.1.6
robotframework-debuglibrary==2.3.0
haversine==2.8.0
jsonpath-rw==1.4.0
munch==3.0.0
webdriver-manager==3.8.6
git+https://github.com/ProzorroUKR/[email protected]#egg=barbecue
git+https://github.com/ProzorroUKR/openprocurement.client.python.git@upstream#egg=openprocurement_client