forked from kytos-ng/kytos-end-to-end-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkytos-init.sh
executable file
·33 lines (25 loc) · 1.7 KB
/
kytos-init.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
set -xe
# XXX: disable sdntrace and sdntrace_cp by default (along with their deps) while we are working on issue #110
for napp in amlight/coloring amlight/sdntrace amlight/scheduler amlight/flow_stats amlight/sdntrace_cp; do
FILE=/var/lib/kytos/napps/$napp
test -h $FILE && unlink $FILE
done
# the settings below are intended to decrease the tests execution time (in fact, the time.sleep() calls
# depend on the values below, otherwise many tests would fail)
sed -i 's/STATS_INTERVAL = 60/STATS_INTERVAL = 3/g' /var/lib/kytos/napps/kytos/of_core/settings.py
sed -i 's/LINK_UP_TIMER = 10/LINK_UP_TIMER = 1/g' /var/lib/kytos/napps/kytos/topology/settings.py
sed -i 's/DEPLOY_EVCS_INTERVAL = 60/DEPLOY_EVCS_INTERVAL = 5/g' /var/lib/kytos/napps/kytos/mef_eline/settings.py
sed -i 's/BOX_RESTORE_TIMER = 0.1/BOX_RESTORE_TIMER = 0.5/' /var/lib/kytos/napps/kytos/flow_manager/settings.py
sed -i 's/LLDP_LOOP_ACTIONS = \["log"\]/LLDP_LOOP_ACTIONS = \["disable","log"\]/' /var/lib/kytos/napps/kytos/of_lldp/settings.py
sed -i 's/LLDP_IGNORED_LOOPS = {}/LLDP_IGNORED_LOOPS = {"00:00:00:00:00:00:00:01": \[\[4, 5\]\]}/' /var/lib/kytos/napps/kytos/of_lldp/settings.py
# increase logging to facilitate troubleshooting
kytosd --help >/dev/null 2>&1 ## create configs at /etc/kytos from templates
sed -i 's/WARNING/INFO/g' /etc/kytos/logging.ini
test -z "$TESTS" && TESTS=tests/
python3 scripts/wait_for_mongo.py 2>/dev/null
python3 -m pytest tests/test_e2e_15_maintenance.py::TestE2EMaintenance::test_085_end_running_mw_on_switch
#python3 -m pytest $TESTS
#tail -f
# only run specific test
# python3 -m pytest --timeout=60 tests/test_e2e_10_mef_eline.py::TestE2EMefEline::test_on_primary_path_fail_should_migrate_to_backup