diff --git a/tests/setup.inc b/tests/setup.inc index 452f7392..f67484c0 100644 --- a/tests/setup.inc +++ b/tests/setup.inc @@ -1,5 +1,6 @@ CONTAINERS=( "piler1" ) CONFIG_DIR="/data/config" +DOCKER_LIMIT=( --pids-limit 256 --memory 512M ) setup() { destroy_containers @@ -18,6 +19,10 @@ start_telegraf() { } launch_containers() { + + log "starting syslog server" + docker run -d --net=piler "${DOCKER_LIMIT[@]}" --name syslog.host sutoj/syslog + docker run -d --net=piler --name piler1 -e PILER_HOST="cust1.acts.hu" -p 80:80 -p 25:25 "$docker_image" 2>/dev/null wait_for_sleep_cycle_in_container "piler1" diff --git a/unit_tests/run.sh b/unit_tests/run.sh index b0ff91c7..03c4bcff 100755 --- a/unit_tests/run.sh +++ b/unit_tests/run.sh @@ -14,6 +14,15 @@ export LD_LIBRARY_PATH=../src pushd "$SCRIPT_DIR" +setup_mysql() { + service mysql start + mysql -u piler -ppiler123 piler1 < ../util/db-mysql.sql +} + +if [[ -v BUILD_NUMBER ]]; then + setup_mysql +fi + ./check_parser_utils ./check_parser ./check_rules