diff options
author | Ryan Chu <ryan.chu@qt.io> | 2019-01-25 22:48:29 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-01-28 14:03:34 +0000 |
commit | 71cd5a6f3643a5369b883d0e36478693de6db024 (patch) | |
tree | ec3be7c85ddb8736ca23b9249047b2b6f518787a /tests/auto/testserver.pri | |
parent | d8d60696da8bbb168ac4554b51c96ea244e407b8 (diff) |
Select single-name SSL certificate for test servers using host network
On Windows and macOS, the containers are deployed into a virtual
machine using the host network. All the containers share the same
hostname (qt-test-server), and they are connected to the same network
domain (local).
When running test in such platforms, use the single-name SSL certificate
(qt-test-server.local) for SSL related tests.
Change-Id: Idf33e01e8dd8814510d848b87b59b5fc0edc903e
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Diffstat (limited to 'tests/auto/testserver.pri')
-rw-r--r-- | tests/auto/testserver.pri | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/tests/auto/testserver.pri b/tests/auto/testserver.pri index 0042571115..54c8b51d49 100644 --- a/tests/auto/testserver.pri +++ b/tests/auto/testserver.pri @@ -62,7 +62,19 @@ isEmpty(TESTSERVER_VERSION) { # Make check with server "qt-test-server.qt-test-net" as a fallback } else { # Make check with docker test servers - DNSDOMAIN = test-net.qt.local + equals(QMAKE_HOST.os, Linux) { + # For the platform supporting docker bridge network, each container is + # assigned a unique hostname and connected to the same network domain + # to communicate with the others. + DEFINES += QT_TEST_SERVER_NAME + DNSDOMAIN = test-net.qt.local + } else { + # For the others, the containers are deployed into a virtual machine + # using the host network. All the containers share the same hostname of + # the virtual machine, and they are connected to the same network domain. + # NOTE: In Windows, Apple Bonjour only works within a single local domain. + DNSDOMAIN = local + } equals(QMAKE_HOST.os, Darwin) { # There is no docker bridge on macOS. It is impossible to ping a container. @@ -86,9 +98,6 @@ isEmpty(TESTSERVER_VERSION) { TESTSERVER_COMPOSE_FILE = \ $$dirname(_QMAKE_CONF_)/tests/testserver/docker-compose-for-windows.yml - # Bonjour only works within a single broadcast domain. - DNSDOMAIN = local - # The connection configuration for the target machine MACHINE_CONFIG = (docker-machine config qt-test-server) @@ -104,7 +113,6 @@ isEmpty(TESTSERVER_VERSION) { CONFIG += PowerShell } else { TESTSERVER_COMPOSE_FILE = $$dirname(_QMAKE_CONF_)/tests/testserver/docker-compose.yml - DEFINES += QT_TEST_SERVER_NAME # The environment variables passed to the docker-compose file TEST_ENV = 'TEST_DOMAIN=$$DNSDOMAIN' |