X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=tox-integration.ini;h=c065542266f9a6caad2f6223da132d1f6cc6853f;hb=9f4fe4d725c9ad77ea1c2ab565ce5759e8a932a6;hp=fb005a08dbb936e29544baebb36ef7c23891d2b6;hpb=0caac0f8bacd54d8b7ae81eda2e5fb53852aaad9;p=ric-plt%2Fa1.git diff --git a/tox-integration.ini b/tox-integration.ini index fb005a0..c065542 100644 --- a/tox-integration.ini +++ b/tox-integration.ini @@ -1,6 +1,6 @@ # ================================================================================== -# Copyright (c) 2019 Nokia -# Copyright (c) 2018-2019 AT&T Intellectual Property. +# Copyright (c) 2019-2020 Nokia +# Copyright (c) 2018-2020 AT&T Intellectual Property. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -24,30 +24,53 @@ whitelist_externals= ab echo pkill + kubectl + getlogs.sh passenv = * deps = - tavern + tavern == 1.2.2 # pin the version changedir=integration_tests commands_pre= - helm install --devel testreceiver -n testreceiver - helm install --devel delayreceiver -n delayreceiver - helm install --devel a1mediator/ -n a1 - sleep 10 + echo "WARNING: make sure you are running with latest docker builds!" +# Fish function that builds and tags the 3 receivers. Run from integration_tests/testxappcode/ +#function a1intbuild +# docker build -t a1:latest . +# cd integration_tests/testxappcode +# docker build -t testreceiver:latest . -f Dockerfile-test-receiver +# docker build -t delayreceiver:latest . -f Dockerfile-delay-receiver +# docker build -t queryreceiver:latest . -f Dockerfile-query-receiver +# cd ../.. +#end + sleep 3 +# helm v3 is helm install [name] [chart] + echo "linting" + helm lint a1mediator + helm lint testreceiver + helm lint dbaas-service + helm install --devel testreceiver testreceiver + helm install --devel a1 a1mediator + helm install --devel dbaas dbaas-service + kubectl get pods --namespace=default + echo "delay so pods can start" + sleep 60 + kubectl get pods --namespace=default + echo "forward ports" ./portforward.sh - sleep 2 + echo "delay so port forward can start" + sleep 5 commands= - echo "linting" - helm lint a1mediator/ - echo "running tavern" - pytest - echo "running ab" - ab -n 100 -c 10 -u putdata -T application/json http://localhost:10000/ric/policies/control_admission_time + echo "running tavern via pytest" + pytest --version + pytest test_a1.tavern.yaml + echo "running apache bench (ab) on healthcheck endpoint" + # use -v 4 to make ab chatty + ab -n 100 -c 10 -v 0 http://localhost:10000/a1-p/healthcheck commands_post= + echo "log collection" + ./getlogs.sh + echo "teardown" helm delete testreceiver - helm del --purge testreceiver - helm delete delayreceiver - helm del --purge delayreceiver helm delete a1 - helm del --purge a1 + helm delete dbaas pkill -9 kubectl sleep 10