Tommy Carpenter | 5ad8f03 | 2019-05-30 14:33:21 -0400 | [diff] [blame] | 1 | # ================================================================================== |
| 2 | # Copyright (c) 2019 Nokia |
| 3 | # Copyright (c) 2018-2019 AT&T Intellectual Property. |
| 4 | # |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | # ================================================================================== |
| 17 | [tox] |
| 18 | envlist = int |
| 19 | |
| 20 | [testenv:int] |
| 21 | whitelist_externals= |
| 22 | sleep |
Tommy Carpenter | 09edf28 | 2019-06-11 09:10:23 -0400 | [diff] [blame] | 23 | helm |
Tommy Carpenter | 5ad8f03 | 2019-05-30 14:33:21 -0400 | [diff] [blame] | 24 | ab |
Tommy Carpenter | 09edf28 | 2019-06-11 09:10:23 -0400 | [diff] [blame] | 25 | echo |
| 26 | pkill |
Tommy Carpenter | 91ae889 | 2019-09-18 10:45:50 -0400 | [diff] [blame] | 27 | kubectl |
Tommy Carpenter | 148e269 | 2019-09-20 10:09:01 -0400 | [diff] [blame] | 28 | getlogs.sh |
Tommy Carpenter | 09edf28 | 2019-06-11 09:10:23 -0400 | [diff] [blame] | 29 | passenv = * |
Tommy Carpenter | 5ad8f03 | 2019-05-30 14:33:21 -0400 | [diff] [blame] | 30 | deps = |
Tommy Carpenter | 5ad8f03 | 2019-05-30 14:33:21 -0400 | [diff] [blame] | 31 | tavern |
| 32 | changedir=integration_tests |
| 33 | commands_pre= |
Tommy Carpenter | 91ae889 | 2019-09-18 10:45:50 -0400 | [diff] [blame] | 34 | echo "WARNING: make sure you're running with latest docker builds!" |
| 35 | sleep 5 |
Tommy Carpenter | 09edf28 | 2019-06-11 09:10:23 -0400 | [diff] [blame] | 36 | helm install --devel testreceiver -n testreceiver |
Tommy Carpenter | 91ae889 | 2019-09-18 10:45:50 -0400 | [diff] [blame] | 37 | helm install --devel a1mediator -n a1 |
| 38 | # wait for helm charts |
Tommy Carpenter | 148e269 | 2019-09-20 10:09:01 -0400 | [diff] [blame] | 39 | sleep 30 |
Tommy Carpenter | 09edf28 | 2019-06-11 09:10:23 -0400 | [diff] [blame] | 40 | ./portforward.sh |
Tommy Carpenter | 5ad8f03 | 2019-05-30 14:33:21 -0400 | [diff] [blame] | 41 | sleep 2 |
| 42 | commands= |
Tommy Carpenter | 09edf28 | 2019-06-11 09:10:23 -0400 | [diff] [blame] | 43 | echo "linting" |
Tommy Carpenter | 91ae889 | 2019-09-18 10:45:50 -0400 | [diff] [blame] | 44 | helm lint a1mediator |
| 45 | helm lint testreceiver |
Tommy Carpenter | 09edf28 | 2019-06-11 09:10:23 -0400 | [diff] [blame] | 46 | echo "running tavern" |
Tommy Carpenter | 91ae889 | 2019-09-18 10:45:50 -0400 | [diff] [blame] | 47 | # run tavern |
| 48 | pytest --tavern-beta-new-traceback |
Tommy Carpenter | 09edf28 | 2019-06-11 09:10:23 -0400 | [diff] [blame] | 49 | echo "running ab" |
Tommy Carpenter | 91ae889 | 2019-09-18 10:45:50 -0400 | [diff] [blame] | 50 | # run apache bench |
Tommy Carpenter | 0a3f676 | 2019-11-06 09:24:16 -0500 | [diff] [blame] | 51 | ab -n 100 -c 10 -v 4 http://localhost:10000/a1-p/healthcheck |
Tommy Carpenter | a0876ef | 2019-10-02 11:15:04 -0400 | [diff] [blame] | 52 | commands_post= |
Tommy Carpenter | aa4ffa7 | 2019-11-14 15:54:49 -0500 | [diff] [blame] | 53 | echo "log collection" |
| 54 | integration_tests/getlogs.sh |
Tommy Carpenter | 148e269 | 2019-09-20 10:09:01 -0400 | [diff] [blame] | 55 | echo "teardown" |
Tommy Carpenter | 09edf28 | 2019-06-11 09:10:23 -0400 | [diff] [blame] | 56 | helm delete testreceiver |
| 57 | helm del --purge testreceiver |
Tommy Carpenter | 09edf28 | 2019-06-11 09:10:23 -0400 | [diff] [blame] | 58 | helm delete a1 |
| 59 | helm del --purge a1 |
| 60 | pkill -9 kubectl |
| 61 | sleep 10 |