summaryrefslogtreecommitdiffstats
path: root/tests/auto/network-settings.h
Commit message (Collapse)AuthorAgeFilesLines
* Port tst_qtcpsocket to the docker serverMårten Nordheim2019-02-281-0/+48
| | | | | | | | 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>
* Convert the QSocks5SocketEngine test to use DockerMårten Nordheim2019-02-281-2/+22
| | | | | Change-Id: I5d223758471a72c93ad57d250001c1de51a208cd Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Extend the default retry times of QtNetworkSettings::verifyConnectionRyan Chu2019-01-231-2/+2
| | | | | | | | | | | | Apparently, it is not enough to just retry 10 times (10 seconds) in the CI network. It happens from time to time that a test fails due to server port is unreachable. Especially, the docker containers are running in a virtual machine on Windows and macOS platforms. In such cases, it needs more time to warm up the service depending on the system loading. Change-Id: Ia0234bff2a82988b62f451e20b50671708784008 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* Docker-based test servers for network-related Qt autotests on macOSRyan Chu2018-10-181-5/+5
| | | | | | | | | | | | | There is no docker bridge on macOS. Docker document recommends using port mapping to connect to a container; but it causes a port conflict if the user is running a service that binds the same port on the host. An alternative solution is to deploy the docker environment into VirtualBox and use the host network option. Task-number: QTQAINFRA-2293 Change-Id: I05dc65c5f8b4be7a1b1874a4ec7c034cc68679ca Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* Rework QNetworkReply tests to use docker-based test serversRyan Chu2018-07-271-0/+41
| | | | | | | | | | | | | | | 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>
* include QTcpSocket to make the header self-contained againOswald Buddenhagen2018-07-181-0/+1
| | | | | | | | amends 9e24b43cb. Change-Id: I000261dcbfb50999c68b590afd91177362645562 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Docker-based test servers for network-related Qt autotestsRyan Chu2018-07-051-0/+19
| | | | | | | | | | | | | | | | | | | | | The existing network test server has some limitations. Most notably, it is not accessible by every Qt developer. Also, some services don't allow simultaneous access, which causes flaky test results. Instead of centralizing all the services to one physical machine, the idea is to build up several dedicated servers inside separate Docker containers. 1. Create testserver.pri and integrate it into the make check command of Qt Test. 2. Define QT_TEST_SERVER flag for changing test parameters at compile time. Task-number: QTQAINFRA-1686 Change-Id: I0422ddb97eb8c11b4818771454851d19671253b1 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io> Reviewed-by: Ryan Chu <ryan.chu@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-061-1/+19
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/qtestlib/tutorial5/containers.cpp examples/widgets/tools/tools.pro src/corelib/io/qprocess.cpp src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/network/kernel/qdnslookup_unix.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/testlib/qtestcase.cpp tools/configure/configureapp.cpp Change-Id: I838ae7f082535a67a4a53aa13a21ba5580758be8
| * tst_QTcpSocket, tst_QUdpSocket: Improve diagnostics.Friedemann Kleint2016-05-021-1/+19
| | | | | | | | | | | | | | | | | | | | Add more error messages on failures. Task-number: QTBUG-25367 Task-number: QTBUG-25368 Change-Id: I064143a058b7b98d9d5eecab8b5da49f5307e1eb Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-071-1/+6
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qftp.cpp src/widgets/itemviews/qheaderview.cpp src/widgets/itemviews/qlistview.cpp tests/auto/network/access/qftp/tst_qftp.cpp Change-Id: I9f928f25d45d8944dd60bb583f649fc1615bc5d9
| * network-settings.h: don't crash when running without the test serverMarc Mutz2016-04-051-1/+6
| | | | | | | | | | | | | | | | | | | | Don't access first() of a potentially-empty QList. Check for QHostInfo::error() first. Also change to constFirst() to prevent a detach. Change-Id: I91fa0bbfb21f62af29abdb23b4869a7f039b259e Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-211-17/+12
|/ | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Autotest: don't leak a socket every call to QtNetworkSettings::hasIPv6Thiago Macieira2015-01-081-0/+1
| | | | | Change-Id: I87e31945052233cee17460ee6f59c02ec416b27b Reviewed-by: Richard J. Moore <rich@kde.org>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* network test settings: support newer FTP server versionsPeter Hartmann2013-08-281-14/+3
| | | | | | | ... which are used by the new test server image. Change-Id: I72ffa73d3e254b278fb9063d32b633b156bd3ec0 Reviewed-by: Richard J. Moore <rich@kde.org>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Fix auto tests build with gcc 4.7Anselmo L. S. Melo2012-05-231-0/+1
| | | | | | | | | Added #include <unistd.h> to tests/auto/network-settings.h, so qtbase auto tests successfully build. It is needed after the header dependency changes, part of gcc 4.7. Change-Id: I76d1082f8454263f2c22c31a13aa3c1bf6a0c82f Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Fallback to IPv4 when IPv6 is not present.Jonas M. Gastal2012-05-211-0/+27
| | | | | | | In tests when IPv6 is not present QSKIP IPv6 tests. Task-number: QTBUG-23660 Change-Id: I02abc7322d765a93cbf661e53c76257f03dca73e Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Don't require exact IMAP server version in autotestsShane2012-04-031-39/+7
| | | | | | | | | | The string from the server should begin with "* OK" and end with "\r\n" according to the IMAP specification. Still have a check for "server ready" as this does not change between cyrus versions. Change-Id: Ia01ed8aa054e5726bba8b411d30edc6205cc8465 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix sanity check of network test serverJason McDonald2011-11-281-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of Qt's autotests depend on access to a test server. For each test that used the test server, tests/auto/network-settings.h created a global object to verify at startup that host lookups to the test server will succeed (and abort the test otherwise). There are two problems with that approach: First, the sanity check happens before main(), and thus before the test framework has started logging test results. This means that if the sanity check aborts the test, the failure message will not be visible in the test output if logging to a file or will cause the output to be malformed if logging to the console in XML format. Second, since Qt 4.7, the host lookup uses a class that connects to the QCoreApplication instance, which doesn't exist before main(), and this caused all tests that included network-settings.h to output an error message from QObject::connect() at the beginning of the test. Both of these problems are solved by removing the global object from network-settings.h and instead performing the sanity check in the initTestCase() function of each test. Task-number: QTBUG-22876 Change-Id: Id49c1826906327bf571686cc11527f0265e5af44 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove Symbian-specific code from tests.Jason McDonald2011-09-291-259/+1
| | | | | | | | | Symbian is not a supported platform for Qt5, so this code is no longer required. Change-Id: I1172e6a42d518490e63e9599bf10579df08259aa Reviewed-on: http://codereview.qt-project.org/5657 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-241-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Initial import from the monolithic Qt.Qt by Nokia2011-04-271-0/+420
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12