Skip to content

Commit 36d827a

Browse files
committed
Try to convince Travis to behave like a normal mechanical being
1 parent 8f67c58 commit 36d827a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/src/gui/testqgsfiledownloader.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ void TestQgsFileDownloader::init()
139139
mError = false;
140140
mCompleted = false;
141141
mExited = false;
142-
mTempFile = new QTemporaryFile();
142+
mTempFile = new QTemporaryFile( QDir::currentPath() + QDir::separator() + "qgs_filedownloader" );
143143
Q_ASSERT( mTempFile->open() );
144144
mTempFile->close();
145145
}
@@ -153,6 +153,7 @@ void TestQgsFileDownloader::cleanup()
153153

154154
void TestQgsFileDownloader::testValidDownload()
155155
{
156+
QVERIFY( ! mTempFile->fileName().isEmpty() );
156157
makeCall( QUrl( "http://www.qgis.org" ), mTempFile->fileName() );
157158
QVERIFY( mExited );
158159
QVERIFY( mCompleted );
@@ -164,6 +165,7 @@ void TestQgsFileDownloader::testValidDownload()
164165

165166
void TestQgsFileDownloader::testInValidDownload()
166167
{
168+
QVERIFY( ! mTempFile->fileName().isEmpty() );
167169
makeCall( QUrl( "http://www.doesnotexistofthatimsure.qgis" ), mTempFile->fileName() );
168170
QVERIFY( mExited );
169171
QVERIFY( !mCompleted );
@@ -175,6 +177,7 @@ void TestQgsFileDownloader::testInValidDownload()
175177

176178
void TestQgsFileDownloader::testCanceledDownload()
177179
{
180+
QVERIFY( ! mTempFile->fileName().isEmpty() );
178181
makeCall( QUrl( "https://github.com/qgis/QGIS/archive/master.zip" ), mTempFile->fileName(), true );
179182
QVERIFY( mExited );
180183
QVERIFY( !mCompleted );
@@ -196,6 +199,7 @@ void TestQgsFileDownloader::testInvalidFile()
196199

197200
void TestQgsFileDownloader::testInvalidUrl()
198201
{
202+
QVERIFY( ! mTempFile->fileName().isEmpty() );
199203
makeCall( QUrl( "xyz://www" ), mTempFile->fileName() );
200204
QVERIFY( mExited );
201205
QVERIFY( !mCompleted );
@@ -206,6 +210,7 @@ void TestQgsFileDownloader::testInvalidUrl()
206210

207211
void TestQgsFileDownloader::testBlankUrl()
208212
{
213+
QVERIFY( ! mTempFile->fileName().isEmpty() );
209214
makeCall( QUrl( "" ), mTempFile->fileName() );
210215
QVERIFY( mExited );
211216
QVERIFY( !mCompleted );
@@ -229,6 +234,7 @@ void TestQgsFileDownloader::testSslError()
229234
{
230235
QFETCH( QString, url );
231236
QFETCH( QString, result );
237+
QVERIFY( ! mTempFile->fileName().isEmpty() );
232238
makeCall( QUrl( url ), mTempFile->fileName() );
233239
QCOMPARE( mErrorMessage, result );
234240
QVERIFY( !mCompleted );

0 commit comments

Comments
 (0)