diff --git a/gretl/src/integrationTest/jobs/Ili2pgValidateDatasetFail/build.gradle b/gretl/src/integrationTest/jobs/Ili2pgValidateDatasetFail/build.gradle index 832ced2d..433f2e01 100644 --- a/gretl/src/integrationTest/jobs/Ili2pgValidateDatasetFail/build.gradle +++ b/gretl/src/integrationTest/jobs/Ili2pgValidateDatasetFail/build.gradle @@ -27,24 +27,14 @@ tasks.register('schemaimport', Ili2pgImportSchema) { strokeArcs = true } -tasks.register('importdataset1', Ili2pgImport) { +tasks.register('importdatasets', Ili2pgImport) { dependsOn 'schemaimport' database = [db_uri, db_user, db_pass] models = "SO_AFU_Schutzbauten_20231212" modeldir = rootProject.projectDir.toString() + ";http://models.interlis.ch" dbschema = db_schema - dataFile = file("ch.so.agi.testeinzelobjekt_valid.xtf") - dataset = "agi.testeinzelobjekt1" -} - -tasks.register('importdataset2', Ili2pgImport) { - dependsOn 'importdataset1' - database = [db_uri, db_user, db_pass] - models = "SO_AFU_Schutzbauten_20231212" - modeldir = rootProject.projectDir.toString() + ";http://models.interlis.ch" - dbschema = db_schema - dataFile = file("ch.so.agi.testeinzelobjekt_valid.xtf") - dataset = "agi.testeinzelobjekt2" + dataFile = ["ch.so.agi.testeinzelobjekt_valid.xtf","ch.so.agi.testeinzelobjekt_valid.xtf"] + dataset = ["agi.testeinzelobjekt1","agi.testeinzelobjekt2"] } /** @@ -54,7 +44,7 @@ tasks.register('importdataset2', Ili2pgImport) { * Die Daten sind nur innerhalb ihres eigenen Datasets valide. */ tasks.register('validate', Ili2pgValidate) { - dependsOn 'importdataset2' + dependsOn 'importdatasets' database = [db_uri, db_user, db_pass] models = "SO_AFU_Schutzbauten_20231212" modeldir = rootProject.projectDir.toString() + ";http://models.interlis.ch" diff --git a/gretl/src/integrationTest/jobs/Ili2pgValidateMultipleDatasets/build.gradle b/gretl/src/integrationTest/jobs/Ili2pgValidateMultipleDatasets/build.gradle index b561dba0..462d7515 100644 --- a/gretl/src/integrationTest/jobs/Ili2pgValidateMultipleDatasets/build.gradle +++ b/gretl/src/integrationTest/jobs/Ili2pgValidateMultipleDatasets/build.gradle @@ -27,24 +27,14 @@ tasks.register('schemaimport', Ili2pgImportSchema) { strokeArcs = true } -tasks.register('importdataset1', Ili2pgImport) { +tasks.register('importdatasets', Ili2pgImport) { dependsOn 'schemaimport' database = [db_uri, db_user, db_pass] models = "SO_AFU_Schutzbauten_20231212" modeldir = rootProject.projectDir.toString() + ";http://models.interlis.ch" dbschema = db_schema - dataFile = file("ch.so.agi.testeinzelobjekt_valid.xtf") - dataset = "agi.testeinzelobjekt1" -} - -tasks.register('importdataset2', Ili2pgImport) { - dependsOn 'importdataset1' - database = [db_uri, db_user, db_pass] - models = "SO_AFU_Schutzbauten_20231212" - modeldir = rootProject.projectDir.toString() + ";http://models.interlis.ch" - dbschema = db_schema - dataFile = file("ch.so.agi.testeinzelobjekt_valid.xtf") - dataset = "agi.testeinzelobjekt2" + dataFile = ["ch.so.agi.testeinzelobjekt_valid.xtf","ch.so.agi.testeinzelobjekt_valid.xtf"] + dataset = ["agi.testeinzelobjekt1","agi.testeinzelobjekt2"] } /** @@ -53,7 +43,7 @@ tasks.register('importdataset2', Ili2pgImport) { * einzeln geprüft werden. */ tasks.register('validate', Ili2pgValidate) { - dependsOn 'importdataset2' + dependsOn 'importdatasets' database = [db_uri, db_user, db_pass] modeldir = rootProject.projectDir.toString() + ";http://models.interlis.ch" dbschema = db_schema diff --git a/gretl/src/integrationTest/jobs/Ili2pgValidateSingleDataset/build.gradle b/gretl/src/integrationTest/jobs/Ili2pgValidateSingleDataset/build.gradle index 4970abc2..c1cb7107 100644 --- a/gretl/src/integrationTest/jobs/Ili2pgValidateSingleDataset/build.gradle +++ b/gretl/src/integrationTest/jobs/Ili2pgValidateSingleDataset/build.gradle @@ -27,24 +27,14 @@ tasks.register('schemaimport', Ili2pgImportSchema) { strokeArcs = true } -tasks.register('importdataset1', Ili2pgImport) { +tasks.register('importdatasets', Ili2pgImport) { dependsOn 'schemaimport' database = [db_uri, db_user, db_pass] models = "SO_AFU_Schutzbauten_20231212" modeldir = rootProject.projectDir.toString() + ";http://models.interlis.ch" dbschema = db_schema - dataFile = file("ch.so.agi.testeinzelobjekt_valid.xtf") - dataset = "agi.testeinzelobjekt1" -} - -tasks.register('importdataset2', Ili2pgImport) { - dependsOn 'importdataset1' - database = [db_uri, db_user, db_pass] - models = "SO_AFU_Schutzbauten_20231212" - modeldir = rootProject.projectDir.toString() + ";http://models.interlis.ch" - dbschema = db_schema - dataFile = file("ch.so.agi.testeinzelobjekt_valid.xtf") - dataset = "agi.testeinzelobjekt2" + dataFile = ["ch.so.agi.testeinzelobjekt_valid.xtf","ch.so.agi.testeinzelobjekt_valid.xtf"] + dataset = ["agi.testeinzelobjekt1","agi.testeinzelobjekt2"] } /** @@ -53,7 +43,7 @@ tasks.register('importdataset2', Ili2pgImport) { * einzeln geprüft werden. */ tasks.register('validate', Ili2pgValidate) { - dependsOn 'importdataset2' + dependsOn 'importdatasets' database = [db_uri, db_user, db_pass] modeldir = rootProject.projectDir.toString() + ";http://models.interlis.ch" dbschema = db_schema diff --git a/gretl/src/main/java/ch/so/agi/gretl/tasks/Ili2pgValidate.java b/gretl/src/main/java/ch/so/agi/gretl/tasks/Ili2pgValidate.java index 356d6ad6..d4573950 100644 --- a/gretl/src/main/java/ch/so/agi/gretl/tasks/Ili2pgValidate.java +++ b/gretl/src/main/java/ch/so/agi/gretl/tasks/Ili2pgValidate.java @@ -31,8 +31,8 @@ public void validateData() { settings.setDatasetName(ds); run(function, settings); } - } else { - run(function, settings); + return; } + run(function, settings); } }