Commit fc8ed19f authored by Kristupas Bobraitis's avatar Kristupas Bobraitis
Browse files

Updated scripts for server and tests startup

parent 6c6fb4c7
......@@ -24,11 +24,11 @@ create_api() {
}
start_webserver() {
postgrest postgrest.conf
}
start_py_webserver() {
./main.py $@
if [ "$1" = "py" ]; then
./main.py ${@:2}
else
postgrest webserver.conf
fi
}
install_dependancies() {
......@@ -74,7 +74,7 @@ install_jmeter() {
}
run_tests() {
./tests/run_tests.sh
./tests/run_tests.sh $1
}
recreate_db() {
......@@ -127,8 +127,10 @@ elif [ "$1" = "install-jmeter" ]; then
install_jmeter
elif [ "$1" = "test" ]; then
run_tests
elif [ "$1" = "test-py" ]; then
run_tests "py"
elif [ "$1" = "start" ]; then
start_webserver
elif [ "$1" = "start-py" ]; then
start_py_webserver ${@:2}
start_webserver "py" ${@:2}
fi
......@@ -13,7 +13,7 @@ class DBHandler(BaseHTTPRequestHandler):
@staticmethod
def read_config():
config = configparser.ConfigParser()
config.read("config.ini")
config.read("py_config.ini")
config = config["POSTGRES"]
return config["database"], config["user"], config["password"], config["host"], config["port"]
......
#!/bin/bash
set -e
set -o pipefail
if [ "$1" = "py" ]; then
TEST_SCENARIO_PATH="$(pwd)/tests/performance/test_scenarios_py.jmx"
else
TEST_SCENARIO_PATH="$(pwd)/tests/performance/test_scenarios.jmx"
fi
TEST_SCENARIO_PATH="$(pwd)/tests/performance/test_scenarios.jmx"
TEST_RESULT_PATH="$(pwd)/tests/performance/result.jtl"
TEST_REPORT_DIR="$(pwd)/tests/performance/result_report"
TEST_REPORT_PATH="$(pwd)/tests/performance/result_report/index.html"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment