Skip to content
Snippets Groups Projects
Commit 16c36229 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

NBI Component:

- Fixing GitLab CI/CD pipeline
- Updated scripts to manually launch NBI tests
parent d2c9b727
No related branches found
No related tags found
2 merge requests!235Release TeraFlowSDN 3.0,!186Resolve "(CTTC) Improve NBI unitary tests framework and integration with GitLab CI/CD pipeline"
......@@ -21,6 +21,9 @@ RCFILE=$PROJECTDIR/coverage/.coveragerc
# Run unitary tests and analyze coverage of code at same time
# helpful pytest flags: --log-level=INFO -o log_cli=true --verbose --maxfail=1 --durations=0
coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO --verbose \
nbi/tests/test_ietf_l2vpn.py
coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO --verbose \
nbi/tests/test_ietf_l2vpn.py \
nbi/tests/test_ietf_network.py
......@@ -66,11 +66,8 @@ unit_test nbi:
- sleep 5
- docker ps -a
- docker logs $IMAGE_NAME
- >
docker exec -i $IMAGE_NAME bash -c "coverage run -m pytest --log-level=INFO -o log_cli=true --verbose
$IMAGE_NAME/tests/test_ietf_l2vpn.py
$IMAGE_NAME/tests/test_ietf_network.py
--junitxml=/opt/results/${IMAGE_NAME}_report.xml"
- docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_ietf_l2vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l2vpn.xml"
- docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_ietf_network.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_network.xml"
- docker exec -i $IMAGE_NAME bash -c "coverage report --include='${IMAGE_NAME}/*' --show-missing"
coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/'
after_script:
......@@ -91,7 +88,7 @@ unit_test nbi:
artifacts:
when: always
reports:
junit: src/$IMAGE_NAME/tests/${IMAGE_NAME}_report.xml
junit: src/$IMAGE_NAME/tests/${IMAGE_NAME}_report_*.xml
## Deployment of the service in Kubernetes Cluster
#deploy nbi:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment