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

NBI component:

- Reorganized test bash and python scripts
- Updated CI/CD unit test
parent 27b4a679
No related branches found
No related tags found
4 merge requests!346Draft: support for restconf protocol,!345Draft: support ipinfusion devices via netconf,!322Resolve "(CTTC) Update NBI WebSocket endpoints to Flask-SocketIO and use gunicorn",!286Resolve "(CTTC) Implement integration test between E2E-IP-Optical SDN Controllers"
......@@ -13,7 +13,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
export FLASK_ENV=development
# Add live logs with: -o log_cli=true
python -m pytest --log-level=DEBUG --verbose nbi/tests/test_nbi.py
PROJECTDIR=`pwd`
cd $PROJECTDIR/src
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_core.py
......@@ -72,7 +72,7 @@ unit_test nbi:
- sleep 5
- docker ps -a
- docker logs $IMAGE_NAME
- docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test__nbi_core.py --junitxml=/opt/results/${IMAGE_NAME}_report_nbi_core.xml"
- docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_core.py --junitxml=/opt/results/${IMAGE_NAME}_report_core.xml"
- docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_tfs_api.py --junitxml=/opt/results/${IMAGE_NAME}_report_tfs_api.xml"
- docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --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=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_ietf_network.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_network.xml"
......
File moved
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