This repository was archived by the owner on Mar 4, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 7 files changed +53
-3
lines changed
auto/datasync/WsRemoteConnectorTest Expand file tree Collapse file tree 7 files changed +53
-3
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,11 @@ DEFINES += QT_DEPRECATED_WARNINGS
2020
2121
2222SOURCES += tst_wsremoteconnector.cpp
23+
2324DEFINES += SRCDIR =\ \\"$$PWD/\\\"
2425DEFINES += BUILDDIR =\ \\"$$OUT_PWD/\\\"
2526
2627HEADERS +=
28+
29+ include (setup.pri )
30+ DEFINES += SETUP_CONF =\ \\"$$SETUP_FILE\\\"
Original file line number Diff line number Diff line change 1+ [general]
2+ name=QtDataSync-TestServer
3+
4+ [server]
5+ host=localhost
6+ port=4242
7+ secret=baum42
8+
9+ [database]
10+ name=QtDataSync
11+ host=localhost
12+ port=15432
13+ username=qtdatasync
14+ password=baum42
Original file line number Diff line number Diff line change 1+ SETUP_FILE =$$PWD /server-setup.conf
Original file line number Diff line number Diff line change @@ -59,9 +59,9 @@ void WsRemoteConnectorTest::initTestCase()
5959
6060 // now start the server!
6161 QProcess p;
62- p.start (QStringLiteral (" %1/../../../../bin/qdatasyncserver start -c %2/../../../../tools/qdatasyncserver/docker_setup.conf " )
62+ p.start (QStringLiteral (" %1/../../../../bin/qdatasyncserver start -c %2" )
6363 .arg (BUILDDIR)
64- .arg (SRCDIR ));
64+ .arg (SETUP_CONF ));
6565 QVERIFY2 (p.waitForFinished (), qPrintable (p.errorString ()));
6666 QCOMPARE (p.exitCode (), EXIT_SUCCESS);
6767}
Original file line number Diff line number Diff line change 1+ version : ' 2.2'
2+ services :
3+ datasync_postgres :
4+ container_name : datasync_example_postgres
5+ image : postgres:latest
6+ ports :
7+ - " 15432:5432/tcp"
8+ environment :
9+ POSTGRES_USER : qtdatasync
10+ POSTGRES_PASSWORD : baum42
11+ POSTGRES_DB : QtDataSync
12+ network_mode : " bridge"
Original file line number Diff line number Diff line change 1+ [general]
2+ name=QtDataSync-TestServer
3+
4+ [server]
5+ host=localhost
6+ port=4242
7+ secret=baum42
8+
9+ [database]
10+ name=QtDataSync
11+ port=15432
12+ username=qtdatasync
13+ password=baum42
Original file line number Diff line number Diff line change @@ -6,7 +6,13 @@ if [[ $PLATFORM == "gcc_64" ]]; then
66 sudo curl -o /usr/local/bin/docker-compose -L " https://github.com/docker/compose/releases/download/1.14.0/docker-compose-$( uname -s) -$( uname -m) "
77 sudo chmod +x /usr/local/bin/docker-compose
88
9- sudo docker-compose -f ./tools/qdatasyncserver/docker-compose.yaml up -d
9+ sudo docker-compose -f ./tests/ci/docker-compose.yaml up -d
10+ # docker run -d --name datasync_example_postgres -e POSTGRES_USER=qtdatasync -e POSTGRES_PASSWORD=baum42 -e POSTGRES_DB=QtDataSync postgres:latest
11+
12+
13+ postgresIp=$( sudo docker inspect -f ' {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' datasync_example_postgres)
14+ echo host=$postgresIp >> ./tests/ci/server-setup.conf
15+ echo ' SETUP_FILE=$$PWD/../../../ci/server-setup.conf' > ./tests/auto/datasync/WsRemoteConnectorTest/setup.pri
1016fi
1117
1218# disable test on osx as workaround (build fail and no docker support)
You can’t perform that action at this time.
0 commit comments