diff options
author | Peter Hartmann <peter.hartmann@trolltech.com> | 2009-05-19 11:29:45 (GMT) |
---|---|---|
committer | Peter Hartmann <peter.hartmann@trolltech.com> | 2009-05-19 11:40:42 (GMT) |
commit | 78e46412675ba15ab16965d651e35c94c5861f90 (patch) | |
tree | 22cc3cf6568225902ca79e1d6e8161003fb58db5 | |
parent | 8413073fe3946ed37f6424f179898af63767f060 (diff) | |
download | Qt-78e46412675ba15ab16965d651e35c94c5861f90.zip Qt-78e46412675ba15ab16965d651e35c94c5861f90.tar.gz Qt-78e46412675ba15ab16965d651e35c94c5861f90.tar.bz2 |
network autotests: do not use imap.troll.no for testing
... but use the test server instead
Reviewed-by: Frans Englich
-rw-r--r-- | tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp | 8 | ||||
-rw-r--r-- | tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp b/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp index 9ef8f9a..df83efe 100644 --- a/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp +++ b/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp @@ -451,14 +451,14 @@ void tst_QHttpSocketEngine::tcpSocketBlockingTest() QTcpSocket socket; // Connect - socket.connectToHost("imap.troll.no", 143); + socket.connectToHost(QtNetworkSettings::serverName(), 143); QVERIFY(socket.waitForConnected()); QCOMPARE(socket.state(), QTcpSocket::ConnectedState); // Read greeting QVERIFY(socket.waitForReadyRead(5000)); QString s = socket.readLine(); - QCOMPARE(s.toLatin1().constData(), "* OK esparsett Cyrus IMAP4 v2.2.8 server ready\r\n"); + QCOMPARE(s.toLatin1().constData(), "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] qt-test-server.qt-test-net Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n"); // Write NOOP QCOMPARE((int) socket.write("1 NOOP\r\n", 8), 8); @@ -508,7 +508,7 @@ void tst_QHttpSocketEngine::tcpSocketNonBlockingTest() tcpSocketNonBlocking_socket = &socket; // Connect - socket.connectToHost("imap.troll.no", 143); + socket.connectToHost(QtNetworkSettings::serverName(), 143); QCOMPARE(socket.state(), QTcpSocket::HostLookupState); QTestEventLoop::instance().enterLoop(30); @@ -533,7 +533,7 @@ void tst_QHttpSocketEngine::tcpSocketNonBlockingTest() // Read greeting QVERIFY(!tcpSocketNonBlocking_data.isEmpty()); QCOMPARE(tcpSocketNonBlocking_data.at(0).toLatin1().constData(), - "* OK esparsett Cyrus IMAP4 v2.2.8 server ready\r\n"); + "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] qt-test-server.qt-test-net Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n"); tcpSocketNonBlocking_data.clear(); tcpSocketNonBlocking_totalWritten = 0; diff --git a/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp b/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp index 86333e0..f8c2fdb 100644 --- a/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp +++ b/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp @@ -589,14 +589,14 @@ void tst_QSocks5SocketEngine::tcpSocketBlockingTest() QTcpSocket socket; // Connect - socket.connectToHost("imap.troll.no", 143); + socket.connectToHost(QtNetworkSettings::serverName(), 143); QVERIFY(socket.waitForConnected()); QCOMPARE(socket.state(), QTcpSocket::ConnectedState); // Read greeting QVERIFY(socket.waitForReadyRead(5000)); QString s = socket.readLine(); - QCOMPARE(s.toLatin1().constData(), "* OK esparsett Cyrus IMAP4 v2.2.8 server ready\r\n"); + QCOMPARE(s.toLatin1().constData(), "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] qt-test-server.qt-test-net Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n"); // Write NOOP QCOMPARE((int) socket.write("1 NOOP\r\n", 8), 8); @@ -646,7 +646,7 @@ void tst_QSocks5SocketEngine::tcpSocketNonBlockingTest() tcpSocketNonBlocking_socket = &socket; // Connect - socket.connectToHost("imap.troll.no", 143); + socket.connectToHost(QtNetworkSettings::serverName(), 143); QCOMPARE(socket.state(), QTcpSocket::HostLookupState); QTestEventLoop::instance().enterLoop(30); @@ -671,7 +671,7 @@ void tst_QSocks5SocketEngine::tcpSocketNonBlockingTest() // Read greeting QVERIFY(!tcpSocketNonBlocking_data.isEmpty()); QCOMPARE(tcpSocketNonBlocking_data.at(0).toLatin1().constData(), - "* OK esparsett Cyrus IMAP4 v2.2.8 server ready\r\n"); + "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] qt-test-server.qt-test-net Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n"); tcpSocketNonBlocking_data.clear(); tcpSocketNonBlocking_totalWritten = 0; |