Skip to content
This repository was archived by the owner on Feb 18, 2025. It is now read-only.

Commit 24a8bfa

Browse files
committed
fix docker/test MySQL version and port
Signed-off-by: Shlomi Noach <[email protected]>
1 parent a8dbfed commit 24a8bfa

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

script/test-integration

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ setup_mysql() {
77
if [ ! -f "dbdeployer" ] ; then
88
return
99
fi
10-
./dbdeployer deploy single "5.7.21" --sandbox-binary $PWD/sandbox/binary --sandbox-home $PWD/sandboxes --sandbox-directory orc-sandbox --port=3306
10+
./dbdeployer deploy single "5.7.26" --sandbox-binary $PWD/sandbox/binary --sandbox-home $PWD/sandboxes --sandbox-directory orc-sandbox --port=3306
1111
mkdir -p bin
1212
ln -s /go/src/github.com/openark/orchestrator/sandboxes/orc-sandbox/use bin/mysql
1313
chmod +x bin/mysql

tests/integration/orchestrator.conf.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"BackendDB": "backend-db-placeholder",
1616
"SQLite3DataFile": "sqlite-data-file-placeholder",
1717
"MySQLOrchestratorHost": "127.0.0.1",
18-
"MySQLOrchestratorPort": 3306,
18+
"MySQLOrchestratorPort": mysql-orchestrator-port-placeholder,
1919
"MySQLOrchestratorDatabase": "test",
2020
"MySQLOrchestratorCredentialsConfigFile": "/tmp/orchestrator-test-my.cnf",
2121
"MySQLOrchestratorSSLPrivateKeyFile": "",

tests/integration/test.sh

+6-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ exec_command_file=/tmp/orchestrator-test.bash
1818
test_mysql_defaults_file=/tmp/orchestrator-test-my.cnf
1919
db_type=""
2020
sqlite_file="/tmp/orchestrator.db"
21+
mysql_port=""
2122
mysql_args="--defaults-extra-file=${test_mysql_defaults_file} --default-character-set=utf8mb4 -s -s"
2223

2324
function run_queries() {
@@ -58,6 +59,8 @@ setup_mysql() {
5859
echo "mysql config (${test_mysql_defaults_file})"
5960
cat $test_mysql_defaults_file
6061
mysql $mysql_args -e "create database if not exists test"
62+
mysql_port="$(mysql $mysql_args -e "select @@port")"
63+
echo "mysql_port: $mysql_port"
6164
}
6265

6366
check_db() {
@@ -181,7 +184,7 @@ deploy_internal_db() {
181184
if [ $? -ne 0 ] ; then
182185
echo "ERROR deploy internal db failed"
183186
cat $test_logfile
184-
return 1
187+
exit 1
185188
fi
186189
echo "- deploy_internal_db result: $?"
187190
}
@@ -190,6 +193,8 @@ generate_config_file() {
190193
cp ${tests_path}/orchestrator.conf.json ${test_config_file}
191194
sed -i -e "s/backend-db-placeholder/${db_type}/g" ${test_config_file}
192195
sed -i -e "s^sqlite-data-file-placeholder^${sqlite_file}^g" ${test_config_file}
196+
sed -i -e "s^mysql-orchestrator-port-placeholder^${mysql_port:-3306}^g" ${test_config_file}
197+
193198
touch "$test_mysql_defaults_file" # required even for sqlite because config file references the my.cnf cgf file
194199
echo "- generate_config_file OK"
195200
}

0 commit comments

Comments
 (0)