blob: 1083f4c5f2715c8c74b5ae50e13e762a9fc511ce [file] [log] [blame]
Tommy Carpenter5ad8f032019-05-30 14:33:21 -04001# ==================================================================================
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]
18envlist = int
19
20[testenv:int]
21whitelist_externals=
22 sleep
Tommy Carpenter09edf282019-06-11 09:10:23 -040023 helm
Tommy Carpenter5ad8f032019-05-30 14:33:21 -040024 ab
Tommy Carpenter09edf282019-06-11 09:10:23 -040025 echo
26 pkill
Tommy Carpenter91ae8892019-09-18 10:45:50 -040027 kubectl
Tommy Carpenter148e2692019-09-20 10:09:01 -040028 getlogs.sh
Tommy Carpenter09edf282019-06-11 09:10:23 -040029passenv = *
Tommy Carpenter5ad8f032019-05-30 14:33:21 -040030deps =
Tommy Carpenter5ad8f032019-05-30 14:33:21 -040031 tavern
32changedir=integration_tests
33commands_pre=
Tommy Carpenter91ae8892019-09-18 10:45:50 -040034 echo "WARNING: make sure you're running with latest docker builds!"
35 sleep 5
Tommy Carpenter09edf282019-06-11 09:10:23 -040036 helm install --devel testreceiver -n testreceiver
Tommy Carpenter91ae8892019-09-18 10:45:50 -040037 helm install --devel a1mediator -n a1
38# wait for helm charts
Tommy Carpenter148e2692019-09-20 10:09:01 -040039 sleep 30
Tommy Carpenter09edf282019-06-11 09:10:23 -040040 ./portforward.sh
Tommy Carpenter5ad8f032019-05-30 14:33:21 -040041 sleep 2
42commands=
Tommy Carpenter09edf282019-06-11 09:10:23 -040043 echo "linting"
Tommy Carpenter91ae8892019-09-18 10:45:50 -040044 helm lint a1mediator
45 helm lint testreceiver
Tommy Carpenter09edf282019-06-11 09:10:23 -040046 echo "running tavern"
Tommy Carpenter91ae8892019-09-18 10:45:50 -040047# run tavern
48 pytest --tavern-beta-new-traceback
Tommy Carpenter09edf282019-06-11 09:10:23 -040049 echo "running ab"
Tommy Carpenter91ae8892019-09-18 10:45:50 -040050# run apache bench
Tommy Carpenter40caa312019-09-12 16:24:10 -040051 ab -n 100 -c 10 -u putdata -T application/json http://localhost:10000/a1-p/policytypes/20000/policies/admission_control_policy
Tommy Carpenter148e2692019-09-20 10:09:01 -040052# echo "log collection"
53#integration_tests/getlogs.sh
Tommy Carpenter5ad8f032019-05-30 14:33:21 -040054commands_post=
Tommy Carpenter148e2692019-09-20 10:09:01 -040055 echo "teardown"
Tommy Carpenter09edf282019-06-11 09:10:23 -040056 helm delete testreceiver
57 helm del --purge testreceiver
Tommy Carpenter09edf282019-06-11 09:10:23 -040058 helm delete a1
59 helm del --purge a1
60 pkill -9 kubectl
61 sleep 10