Merge branch 'feature/python-e2e-tests-jm' into 'develop'

Python e2e test

See merge request PBSA/peerplays!221
This commit is contained in:
Vlad Dobromyslov 2023-05-15 10:53:07 +00:00
commit d367c308b8
2 changed files with 31 additions and 3 deletions

View file

@ -9,6 +9,7 @@ stages:
- build - build
- test - test
- dockerize - dockerize
- python-test
build-mainnet: build-mainnet:
stage: build stage: build
@ -48,6 +49,7 @@ dockerize-mainnet:
IMAGE: $CI_REGISTRY_IMAGE/mainnet/$CI_COMMIT_REF_SLUG:$CI_COMMIT_SHA IMAGE: $CI_REGISTRY_IMAGE/mainnet/$CI_COMMIT_REF_SLUG:$CI_COMMIT_SHA
before_script: before_script:
- docker info - docker info
- docker builder prune -a -f
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script: script:
- docker build --no-cache -t $IMAGE . - docker build --no-cache -t $IMAGE .
@ -56,8 +58,6 @@ dockerize-mainnet:
- docker rmi $IMAGE - docker rmi $IMAGE
tags: tags:
- builder - builder
when:
manual
timeout: timeout:
3h 3h
@ -119,3 +119,32 @@ dockerize-testnet:
manual manual
timeout: timeout:
3h 3h
test-e2e:
stage: python-test
variables:
IMAGE: $CI_REGISTRY_IMAGE/mainnet/$CI_COMMIT_REF_SLUG:$CI_COMMIT_SHA
before_script:
- docker info
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- git clone https://gitlab.com/PBSA/tools-libs/peerplays-utils.git
- cd peerplays-utils/peerplays-qa-environment
- git checkout origin/feature/python-e2e-tests-for-CI
- cd e2e-tests/
- python3 -m venv venv
- source venv/bin/activate
- pip3 install -r requirements.txt
- python3 main.py --stop
- docker ps -a
- docker pull $IMAGE
- docker tag $IMAGE peerplays-base:latest
- docker image ls -a
- python3 main.py --start all
- docker ps -a
- python3 -m pytest test_btc_init_state.py test_hive_inital_state.py test_pp_inital_state.py
- python3 main.py --stop
- deactivate
- docker ps -a
tags:
- python-tests

View file

@ -190,7 +190,6 @@ ADD . peerplays
RUN \ RUN \
cd peerplays && \ cd peerplays && \
git submodule update --init --recursive && \ git submodule update --init --recursive && \
git symbolic-ref --short HEAD && \
git log --oneline -n 5 && \ git log --oneline -n 5 && \
mkdir build && \ mkdir build && \
cd build && \ cd build && \