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
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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
+3 −6
Original line number Diff line number Diff line
@@ -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: