diff options
author | Ryan Chu <ryan.chu@qt.io> | 2018-05-03 15:01:57 +0200 |
---|---|---|
committer | Ryan Chu <ryan.chu@qt.io> | 2018-07-27 17:40:27 +0000 |
commit | 3f80783b1188afdf032571b48bc47a160d6dccf6 (patch) | |
tree | 7b0be362e8a51eb56b1376b7bf7cad603117a889 /tests/auto/network-settings.h | |
parent | 0bb760260eb055f813247bf9ef06e372cac219d3 (diff) |
Rework QNetworkReply tests to use docker-based test servers
This change frees the tests of their dependence on the Qt internal test
server (qt-test-server.qt-test-net). It makes the developers run the
tests out of Qt testing infrastructure.
If the user has installed Docker engine on their host, the test servers
will be built up inside separate Docker containers, and then, the test
case goes with the Docker-based test servers. Otherwise, the test case
will keep using the Qt internal test server.
Task-number: QTQAINFRA-1686
Change-Id: I518bc3675bfd658938509744b0e7e0610bc8bf66
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Diffstat (limited to 'tests/auto/network-settings.h')
-rw-r--r-- | tests/auto/network-settings.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/auto/network-settings.h b/tests/auto/network-settings.h index f423bc7d56..a3c318420f 100644 --- a/tests/auto/network-settings.h +++ b/tests/auto/network-settings.h @@ -173,4 +173,45 @@ public: return result.toLocal8Bit(); } #endif // QT_NETWORK_LIB + + static QString ftpServerName() + { +#ifdef QT_TEST_SERVER + return QString("vsftpd.") % serverDomainName(); +#else + return serverName(); +#endif + } + static QString ftpProxyServerName() + { +#ifdef QT_TEST_SERVER + return QString("ftp-proxy.") % serverDomainName(); +#else + return serverName(); +#endif + } + static QString httpServerName() + { +#ifdef QT_TEST_SERVER + return QString("apache2.") % serverDomainName(); +#else + return serverName(); +#endif + } + static QString httpProxyServerName() + { +#ifdef QT_TEST_SERVER + return QString("squid.") % serverDomainName(); +#else + return serverName(); +#endif + } + static QString socksProxyServerName() + { +#ifdef QT_TEST_SERVER + return QString("danted.") % serverDomainName(); +#else + return serverName(); +#endif + } }; |