Mostly integration test work:
[ric-plt/a1.git] / tox-integration.ini
index 539da92..428d14b 100644 (file)
@@ -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.
@@ -20,18 +20,53 @@ envlist = int
 [testenv:int]
 whitelist_externals=
     sleep
-    docker-compose
+    helm
     ab
+    echo
+    pkill
+    kubectl
+    getlogs.sh
+passenv = *
 deps =
-    pytest-xdist
     tavern
 changedir=integration_tests
 commands_pre=
-    docker-compose up --build -d
+    echo "WARNING: make sure you're 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 5
+# 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
+# wait for helm charts
+    sleep 30
+    ./portforward.sh
     sleep 2
 commands=
-# helm lint a1mediator/
-    pytest -n 2
-    ab -n 100 -c 10 -u putdata -T application/json http://localhost:10000/ric/policies/control_admission_time
+    echo "running tavern"
+# run tavern
+    pytest --tavern-beta-new-traceback test_a1.tavern.yaml
+    echo "running ab"
+# run apache bench
+    ab -n 100 -c 10 -v 4 http://localhost:10000/a1-p/healthcheck
 commands_post=
-    docker-compose down
+    echo "log collection"
+    integration_tests/getlogs.sh
+    echo "teardown"
+    helm delete testreceiver
+    helm delete a1
+    helm delete dbaas
+    pkill -9 kubectl
+    sleep 10