Skip to content
Permalink
Browse files

Merge pull request #33782 from nyalldawson/fix_azure

Fix azure test failure, missing .arg
  • Loading branch information
m-kuhn committed Jan 14, 2020
2 parents a47bbf4 + 21fc95e commit f00cbb300bfd1d71db5b398bff973184744ccc03
@@ -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 ) );
}
}

@@ -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" ) );
@@ -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 );

0 comments on commit f00cbb3

Please sign in to comment.
You can’t perform that action at this time.