From d7d37a1c7f085a8b1cd74a7b816013f53eb7c383 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 9 Apr 2010 12:51:11 +0200 Subject: Autotest: fix paths on the test server after update. Reviewed-by: Trust Me (cherry picked from commit 11aebece9ecc3214dd7a8006d980e90dcbddb577) --- .../qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp | 2 +- tests/auto/qnetworkreply/tst_qnetworkreply.cpp | 12 ++++++------ tests/auto/qsslsocket/tst_qsslsocket.cpp | 1 + tests/auto/qxmlquery/tst_qxmlquery.cpp | 12 ++++++------ 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp b/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp index f27f469..35ebbd9 100644 --- a/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp +++ b/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp @@ -385,7 +385,7 @@ void tst_QHttpNetworkConnection::post_data() QTest::addColumn("contentLength"); QTest::addColumn("downloadSize"); - QTest::newRow("success-internal") << "http://" << QtNetworkSettings::serverName() << "/cgi-bin/echo.cgi" << ushort(80) << false << "7 bytes" << 200 << "OK" << 7 << 7; + QTest::newRow("success-internal") << "http://" << QtNetworkSettings::serverName() << "/qtest/cgi-bin/echo.cgi" << ushort(80) << false << "7 bytes" << 200 << "OK" << 7 << 7; QTest::newRow("failure-internal") << "http://" << QtNetworkSettings::serverName() << "/t" << ushort(80) << false << "Hello World" << 404 << "Not Found" << -1 << 997 + QtNetworkSettings::serverName().size(); } diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp index e269092..c238f59 100644 --- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp @@ -1410,10 +1410,10 @@ void tst_QNetworkReply::deleteFromHttp_data() // for status codes to expect, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html QTest::newRow("405-method-not-allowed") << QUrl("http://" + QtNetworkSettings::serverName() + "/index.html") << 405 << QNetworkReply::ContentOperationNotPermittedError; - QTest::newRow("200-ok") << QUrl("http://" + QtNetworkSettings::serverName() + "/cgi-bin/http-delete.cgi?200-ok") << 200 << QNetworkReply::NoError; - QTest::newRow("202-accepted") << QUrl("http://" + QtNetworkSettings::serverName() + "/cgi-bin/http-delete.cgi?202-accepted") << 202 << QNetworkReply::NoError; - QTest::newRow("204-no-content") << QUrl("http://" + QtNetworkSettings::serverName() + "/cgi-bin/http-delete.cgi?204-no-content") << 204 << QNetworkReply::NoError; - QTest::newRow("404-not-found") << QUrl("http://" + QtNetworkSettings::serverName() + "/cgi-bin/http-delete.cgi?404-not-found") << 404 << QNetworkReply::ContentNotFoundError; + QTest::newRow("200-ok") << QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/cgi-bin/http-delete.cgi?200-ok") << 200 << QNetworkReply::NoError; + QTest::newRow("202-accepted") << QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/cgi-bin/http-delete.cgi?202-accepted") << 202 << QNetworkReply::NoError; + QTest::newRow("204-no-content") << QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/cgi-bin/http-delete.cgi?204-no-content") << 204 << QNetworkReply::NoError; + QTest::newRow("404-not-found") << QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/cgi-bin/http-delete.cgi?404-not-found") << 404 << QNetworkReply::ContentNotFoundError; } void tst_QNetworkReply::deleteFromHttp() @@ -3886,10 +3886,10 @@ void tst_QNetworkReply::authorizationError_data() QTest::addColumn("httpBody"); QTest::newRow("unknown-authorization-method") << "http://" + QtNetworkSettings::serverName() + - "/cgi-bin/http-unknown-authentication-method.cgi?401-authorization-required" << 1 << 1 + "/qtest/cgi-bin/http-unknown-authentication-method.cgi?401-authorization-required" << 1 << 1 << int(QNetworkReply::AuthenticationRequiredError) << 401 << "authorization required"; QTest::newRow("unknown-proxy-authorization-method") << "http://" + QtNetworkSettings::serverName() + - "/cgi-bin/http-unknown-authentication-method.cgi?407-proxy-authorization-required" << 1 << 1 + "/qtest/cgi-bin/http-unknown-authentication-method.cgi?407-proxy-authorization-required" << 1 << 1 << int(QNetworkReply::ProxyAuthenticationRequiredError) << 407 << "authorization required"; } diff --git a/tests/auto/qsslsocket/tst_qsslsocket.cpp b/tests/auto/qsslsocket/tst_qsslsocket.cpp index 4397ab1..2bfce74 100644 --- a/tests/auto/qsslsocket/tst_qsslsocket.cpp +++ b/tests/auto/qsslsocket/tst_qsslsocket.cpp @@ -1535,6 +1535,7 @@ void tst_QSslSocket::verifyMode() loop.exec(); QVERIFY(clientSocket.isEncrypted()); + qDebug() << server.socket->sslErrors(); QVERIFY(server.socket->sslErrors().isEmpty()); } diff --git a/tests/auto/qxmlquery/tst_qxmlquery.cpp b/tests/auto/qxmlquery/tst_qxmlquery.cpp index a6c0d35..be0d708 100644 --- a/tests/auto/qxmlquery/tst_qxmlquery.cpp +++ b/tests/auto/qxmlquery/tst_qxmlquery.cpp @@ -2040,7 +2040,7 @@ void tst_QXmlQuery::fnDocNetworkAccessSuccess_data() const return; QTest::newRow("http scheme") - << QUrl(QString("http://" + QtNetworkSettings::serverName() + "/qxmlquery/wellFormed.xml")) + << QUrl(QString("http://" + QtNetworkSettings::serverName() + "/qtest/qxmlquery/wellFormed.xml")) << QByteArray("Some Text"); QTest::newRow("ftp scheme") @@ -2103,10 +2103,10 @@ void tst_QXmlQuery::fnDocNetworkAccessFailure_data() const return; QTest::newRow("http scheme, not well-formed") - << QUrl(QString("http://" + QtNetworkSettings::serverName() + "/qxmlquery/notWellformed.xml")); + << QUrl(QString("http://" + QtNetworkSettings::serverName() + "/qtest/qxmlquery/notWellformed.xml")); QTest::newRow("https scheme, not well-formed") - << QUrl(QString("https://" + QtNetworkSettings::serverName() + "/qxmlquery/notWellformedViaHttps.xml")); + << QUrl(QString("https://" + QtNetworkSettings::serverName() + "/qtest/qxmlquery/notWellformedViaHttps.xml")); QTest::newRow("https scheme, nonexistent host") << QUrl(QLatin1String("https://this.host.does.not.exist.I.SWear")); @@ -2564,7 +2564,7 @@ void tst_QXmlQuery::setQueryQUrlSuccess_data() const << QByteArray("This was received via FTP"); QTest::newRow("A valid query via the http scheme") - << QUrl::fromEncoded(QString("http://" + QtNetworkSettings::serverName() + "/qxmlquery/viaHttp.xq").toLatin1()) + << QUrl::fromEncoded(QString("http://" + QtNetworkSettings::serverName() + "/qtest/qxmlquery/viaHttp.xq").toLatin1()) << QByteArray("This was received via HTTP."); } @@ -2630,11 +2630,11 @@ void tst_QXmlQuery::setQueryQUrlFailure_data() const QTest::newRow("A query via http:// that is completely empty, but readable.") << QUrl::fromEncoded(QString( - "http://" + QtNetworkSettings::serverName() + "/qxmlquery/completelyEmptyQuery.xq").toLatin1()); + "http://" + QtNetworkSettings::serverName() + "/qtest/qxmlquery/completelyEmptyQuery.xq").toLatin1()); QTest::newRow("A query via ftp:// that is completely empty, but readable.") << QUrl::fromEncoded(QString( - "ftp://" + QtNetworkSettings::serverName() + "qxmlquery/completelyEmptyQuery.xq").toLatin1()); + "ftp://" + QtNetworkSettings::serverName() + "/pub/qxmlquery/completelyEmptyQuery.xq").toLatin1()); } -- cgit v0.12