Skip to content

Commit

Permalink
Merge pull request #33782 from nyalldawson/fix_azure
Browse files Browse the repository at this point in the history
Fix azure test failure, missing .arg
  • Loading branch information
m-kuhn committed Jan 14, 2020
2 parents a47bbf4 + 21fc95e commit f00cbb3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/analysis/processing/qgsalgorithmpackage.cpp
Expand Up @@ -96,7 +96,7 @@ QVariantMap QgsPackageAlgorithm::processAlgorithm( const QVariantMap &parameters
feedback->pushInfo( QObject::tr( "Removing existing file '%1'" ).arg( packagePath ) );
if ( !QFile( packagePath ).remove() )
{
throw QgsProcessingException( QObject::tr( "Could not remove existing file '%1'" ) );
throw QgsProcessingException( QObject::tr( "Could not remove existing file '%1'" ).arg( packagePath ) );
}
}

Expand Down
4 changes: 4 additions & 0 deletions tests/src/analysis/testqgsprocessingalgs.cpp
Expand Up @@ -217,10 +217,12 @@ void TestQgsProcessingAlgs::packageAlg()
QVERIFY( pointLayer->isValid() );
QCOMPARE( pointLayer->wkbType(), mPointsLayer->wkbType() );
QCOMPARE( pointLayer->featureCount(), mPointsLayer->featureCount() );
pointLayer.reset();
std::unique_ptr< QgsVectorLayer > polygonLayer = qgis::make_unique< QgsVectorLayer >( outputGpkg + "|layername=polygons", "polygons", "ogr" );
QVERIFY( polygonLayer->isValid() );
QCOMPARE( polygonLayer->wkbType(), mPolygonLayer->wkbType() );
QCOMPARE( polygonLayer->featureCount(), mPolygonLayer->featureCount() );
polygonLayer.reset();

std::unique_ptr<QgsVectorLayer> rectangles = qgis::make_unique<QgsVectorLayer>( QStringLiteral( TEST_DATA_DIR ) + "/rectangles.shp",
QStringLiteral( "rectangles" ), QStringLiteral( "ogr" ) );
Expand All @@ -235,9 +237,11 @@ void TestQgsProcessingAlgs::packageAlg()
QVERIFY( rectanglesPackagedLayer->isValid() );
QCOMPARE( rectanglesPackagedLayer->wkbType(), rectanglesPackagedLayer->wkbType() );
QCOMPARE( rectanglesPackagedLayer->featureCount(), rectangles->featureCount() );
rectanglesPackagedLayer.reset();

pointLayer = qgis::make_unique< QgsVectorLayer >( outputGpkg + "|layername=points", "points", "ogr" );
QVERIFY( pointLayer->isValid() );
pointLayer.reset();

// And finally, test with overwrite enabled
QVariantMap results3 = pkgAlg( QStringList() << rectangles->id(), outputGpkg, true, &ok );
Expand Down

0 comments on commit f00cbb3

Please sign in to comment.