This repository was archived by the owner on Feb 18, 2025. It is now read-only.
File tree 3 files changed +8
-3
lines changed
3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ setup_mysql() {
7
7
if [ ! -f " dbdeployer" ] ; then
8
8
return
9
9
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
11
11
mkdir -p bin
12
12
ln -s /go/src/github.com/openark/orchestrator/sandboxes/orc-sandbox/use bin/mysql
13
13
chmod +x bin/mysql
Original file line number Diff line number Diff line change 15
15
"BackendDB" : " backend-db-placeholder" ,
16
16
"SQLite3DataFile" : " sqlite-data-file-placeholder" ,
17
17
"MySQLOrchestratorHost" : " 127.0.0.1" ,
18
- "MySQLOrchestratorPort" : 3306 ,
18
+ "MySQLOrchestratorPort" : mysql-orchestrator-port-placeholder ,
19
19
"MySQLOrchestratorDatabase" : " test" ,
20
20
"MySQLOrchestratorCredentialsConfigFile" : " /tmp/orchestrator-test-my.cnf" ,
21
21
"MySQLOrchestratorSSLPrivateKeyFile" : " " ,
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ exec_command_file=/tmp/orchestrator-test.bash
18
18
test_mysql_defaults_file=/tmp/orchestrator-test-my.cnf
19
19
db_type=" "
20
20
sqlite_file=" /tmp/orchestrator.db"
21
+ mysql_port=" "
21
22
mysql_args=" --defaults-extra-file=${test_mysql_defaults_file} --default-character-set=utf8mb4 -s -s"
22
23
23
24
function run_queries() {
@@ -58,6 +59,8 @@ setup_mysql() {
58
59
echo " mysql config (${test_mysql_defaults_file} )"
59
60
cat $test_mysql_defaults_file
60
61
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 "
61
64
}
62
65
63
66
check_db () {
@@ -181,7 +184,7 @@ deploy_internal_db() {
181
184
if [ $? -ne 0 ] ; then
182
185
echo " ERROR deploy internal db failed"
183
186
cat $test_logfile
184
- return 1
187
+ exit 1
185
188
fi
186
189
echo " - deploy_internal_db result: $? "
187
190
}
@@ -190,6 +193,8 @@ generate_config_file() {
190
193
cp ${tests_path} /orchestrator.conf.json ${test_config_file}
191
194
sed -i -e " s/backend-db-placeholder/${db_type} /g" ${test_config_file}
192
195
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
+
193
198
touch " $test_mysql_defaults_file " # required even for sqlite because config file references the my.cnf cgf file
194
199
echo " - generate_config_file OK"
195
200
}
You can’t perform that action at this time.
0 commit comments