summaryrefslogtreecommitdiffstats
path: root/tests/auto/network-settings.h
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2019-02-12 17:05:51 +0100
committerMårten Nordheim <marten.nordheim@qt.io>2019-02-28 15:48:31 +0000
commita247d08faef289dcaab2c7132189e3cf051d27fb (patch)
tree973cd2cc81cd918b8f03b1097a889f051e7ede17 /tests/auto/network-settings.h
parent1844f011f67a767d163d16d5338ad24ade7eb0c1 (diff)
Port tst_qtcpsocket to the docker server
The iptables container launches with extra capabilities to actually be able to make changes to the tables. Change-Id: I892fd18853ce882709e21791e6c88217e5029d53 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'tests/auto/network-settings.h')
-rw-r--r--tests/auto/network-settings.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/tests/auto/network-settings.h b/tests/auto/network-settings.h
index 092830a51a..bf632c9846 100644
--- a/tests/auto/network-settings.h
+++ b/tests/auto/network-settings.h
@@ -228,10 +228,58 @@ public:
#endif
}
+ static QString echoServerName()
+ {
+#ifdef QT_TEST_SERVER_NAME
+ return QString("echo.") % serverDomainName();
+#else
+ return serverName();
+#endif
+ }
+
+ static QString firewallServerName()
+ {
+#ifdef QT_TEST_SERVER_NAME
+ return QString("iptables.") % serverDomainName();
+#else
+ return serverName();
+#endif
+ }
+
#ifdef QT_NETWORK_LIB
static QHostAddress imapServerIp()
{
return getServerIpImpl(imapServerName());
}
+
+ static QHostAddress httpServerIp()
+ {
+ return getServerIpImpl(httpServerName());
+ }
+
+ static QHostAddress httpProxyServerIp()
+ {
+ return getServerIpImpl(httpProxyServerName());
+ }
+
+ static QHostAddress socksProxyServerIp()
+ {
+ return getServerIpImpl(socksProxyServerName());
+ }
+
+ static QHostAddress ftpProxyServerIp()
+ {
+ return getServerIpImpl(ftpProxyServerName());
+ }
+
+ static QHostAddress ftpServerIp()
+ {
+ return getServerIpImpl(ftpServerName());
+ }
+
+ static QHostAddress firewallServerIp()
+ {
+ return getServerIpImpl(firewallServerName());
+ }
#endif
};