diff --git a/src/e2e-test/features/bigquery/source/BigQueryToBigQuery.feature b/src/e2e-test/features/bigquery/source/BigQueryToBigQuery.feature index 299a48125b..0a87779c3b 100644 --- a/src/e2e-test/features/bigquery/source/BigQueryToBigQuery.feature +++ b/src/e2e-test/features/bigquery/source/BigQueryToBigQuery.feature @@ -64,7 +64,7 @@ Feature: BigQuery source - Verification of BigQuery to BigQuery successful data Then Connect source as "BigQuery" and sink as "BigQuery" to establish connection Then Save the pipeline Then Preview and run the pipeline - Then Wait till pipeline preview is in running state + Then Wait till pipeline preview is in running state and check if any error occurs Then Open and capture pipeline preview logs Then Verify the preview run status of pipeline in the logs is "failed" diff --git a/src/e2e-test/features/gcs/sink/GCSSinkError.feature b/src/e2e-test/features/gcs/sink/GCSSinkError.feature index 0718136d4a..3605bcf20e 100644 --- a/src/e2e-test/features/gcs/sink/GCSSinkError.feature +++ b/src/e2e-test/features/gcs/sink/GCSSinkError.feature @@ -43,7 +43,7 @@ Feature: GCS sink - Verify GCS Sink plugin error scenarios Then Open GCS sink properties Then Replace input plugin property: "project" with value: "projectId" Then Enter input plugin property: "referenceName" with value: "gcsReferenceName" - Then Enter GCS source property path "gcsInvalidBucketName" + Then Enter input plugin property: "path" with value: "gcsInvalidBucketName" Then Select GCS property format "csv" Then Click on the Validate button Then Verify that the Plugin Property: "path" is displaying an in-line error message: "errorMessageInvalidBucketName" diff --git a/src/e2e-test/features/gcsmove/GCSMoveErrorScenarios.feature b/src/e2e-test/features/gcsmove/GCSMoveErrorScenarios.feature index a6c40a505e..d83eae363f 100644 --- a/src/e2e-test/features/gcsmove/GCSMoveErrorScenarios.feature +++ b/src/e2e-test/features/gcsmove/GCSMoveErrorScenarios.feature @@ -19,7 +19,7 @@ Feature: GCSMove - Validate GCSMove plugin error scenarios When Expand Plugin group in the LHS plugins list: "Conditions and Actions" When Select plugin: "GCS Move" from the plugins list as: "Conditions and Actions" When Navigate to the properties page of plugin: "GCS Move" - Then Enter GCSMove property source path "gcsInvalidBucketName" + Then Enter input plugin property: "sourcePath" with value: "gcsInvalidBucketName" Then Enter GCSMove property destination path Then Verify GCS Move property "sourcePath" invalid bucket name error message is displayed for bucket "gcsInvalidBucketName" @@ -30,5 +30,5 @@ Feature: GCSMove - Validate GCSMove plugin error scenarios When Select plugin: "GCS Move" from the plugins list as: "Conditions and Actions" When Navigate to the properties page of plugin: "GCS Move" Then Enter GCSMove property source path "gcsCsvFile" - Then Enter GCSMove property destination path "gcsInvalidBucketName" + Then Enter input plugin property: "destPath" with value: "gcsInvalidBucketName" Then Verify GCS Move property "destPath" invalid bucket name error message is displayed for bucket "gcsInvalidBucketName" diff --git a/src/e2e-test/java/io/cdap/plugin/common/stepsdesign/TestSetupHooks.java b/src/e2e-test/java/io/cdap/plugin/common/stepsdesign/TestSetupHooks.java index cee5d08468..4b12e583ef 100644 --- a/src/e2e-test/java/io/cdap/plugin/common/stepsdesign/TestSetupHooks.java +++ b/src/e2e-test/java/io/cdap/plugin/common/stepsdesign/TestSetupHooks.java @@ -208,14 +208,13 @@ public static void createBucketWithAvroTestFile() throws IOException, URISyntaxE @After(order = 1, value = "@GCS_CSV_TEST or @GCS_TSV_TEST or @GCS_BLOB_TEST " + "or @GCS_DELIMITED_TEST or @GCS_TEXT_TEST or @GCS_OUTPUT_FIELD_TEST or @GCS_DATATYPE_1_TEST or " + - "@GCS_DATATYPE_2_TEST or @GCS_READ_RECURSIVE_TEST or @GCS_DELETE_WILDCARD_TEST or @GCS_CSV_RANGE_TEST or" + - " @GCS_PARQUET_TEST or @GCS_AVRO_TEST or @GCS_DATATYPE_TEST or @GCS_AVRO_FILE or @GCS_CSV or " + - "GCS_MULTIPLE_FILES_TEST or GCS_MULTIPLE_FILES_REGEX_TEST or @GCS_JSON_TEST") + "@GCS_DATATYPE_2_TEST or @GCS_READ_RECURSIVE_TEST or @GCS_DELETE_WILDCARD_TEST or @GCS_CSV_RANGE_TEST or " + + "@GCS_PARQUET_TEST or @GCS_AVRO_TEST or @GCS_DATATYPE_TEST or @GCS_AVRO_FILE or @GCS_CSV or " + + "@GCS_JSON_TEST") public static void deleteSourceBucketWithFile() { deleteGCSBucket(gcsSourceBucketName); PluginPropertyUtils.removePluginProp("gcsSourceBucketName"); PluginPropertyUtils.removePluginProp("gcsSourcePath"); - gcsSourceBucketName = StringUtils.EMPTY; } @After(order = 1, value = "@GCS_DELETE_MULTIPLE_BUCKETS_TEST") @@ -430,7 +429,7 @@ private static void createSourceBQViewWithQueries(String bqCreateViewQueryFile) } private static String createGCSBucketWithFile(String filePath) throws IOException, URISyntaxException { - String bucketName = StorageClient.createBucket("00000000-e2e-" + UUID.randomUUID()).getName(); + String bucketName = StorageClient.createBucket("cdf-e2e-test-" + UUID.randomUUID()).getName(); StorageClient.uploadObject(bucketName, filePath, filePath); PluginPropertyUtils.addPluginProp("gcsSourceBucketName", bucketName); PluginPropertyUtils.addPluginProp("gcsSourcePath", "gs://" + bucketName + "/" + filePath); @@ -972,12 +971,18 @@ public static void createBucketWithMultipleTestFiles() throws IOException, URISy gcsSourceBucketName = createGCSBucketWithMultipleFiles(PluginPropertyUtils.pluginProp("gcsMultipleFilesPath")); } + @After(order = 1, value = "@GCS_MULTIPLE_FILES_TEST or @GCS_MULTIPLE_FILES_REGEX_TEST") + public static void deleteSourceBucketWithMultipleFile() { + deleteGCSBucket(gcsSourceBucketName); + PluginPropertyUtils.removePluginProp("gcsSourceBucketName"); + PluginPropertyUtils.removePluginProp("gcsSourcePath"); + } + @Before(order = 1, value = "@GCS_MULTIPLE_FILES_REGEX_TEST") public static void createBucketWithMultipleTestFilesWithRegex () throws IOException, URISyntaxException { gcsSourceBucketName = createGCSBucketWithMultipleFiles(PluginPropertyUtils.pluginProp( "gcsMultipleFilesFilterRegexPath")); - PluginPropertyUtils.addPluginProp(" bqTargetTable", bqTargetTable); - BeforeActions.scenario.write("BQ Target Table " + bqTargetTable + " updated successfully"); + PluginPropertyUtils.addPluginProp(" gcsSourceBucketName", gcsSourceBucketName); } @Before(order = 1, value = "@BQ_EXISTING_SOURCE_TEST") @@ -1322,7 +1327,7 @@ public static void createSinkBQInsertTable() throws IOException, InterruptedExce BeforeActions.scenario.write("BQ Target Table " + bqTargetTable + " updated successfully"); } private static String createGCSBucketLifeCycle() throws IOException, URISyntaxException { - String bucketName = StorageClient.createBucketwithLifeCycle("00000000-e2e-" + UUID.randomUUID(), 30).getName(); + String bucketName = StorageClient.createBucketwithLifeCycle("cdf-e2e-test-" + UUID.randomUUID(), 30).getName(); PluginPropertyUtils.addPluginProp("gcsTargetBucketName", bucketName); return bucketName; } diff --git a/src/e2e-test/java/io/cdap/plugin/gcsmove/stepsdesign/GCSMove.java b/src/e2e-test/java/io/cdap/plugin/gcsmove/stepsdesign/GCSMove.java index a343452899..5736f3e5d1 100644 --- a/src/e2e-test/java/io/cdap/plugin/gcsmove/stepsdesign/GCSMove.java +++ b/src/e2e-test/java/io/cdap/plugin/gcsmove/stepsdesign/GCSMove.java @@ -109,7 +109,7 @@ public void verifyGCSMovePropertyInvalidBucketNameErrorMessageIsDisplayedForBuck String bucketName) { CdfStudioActions.clickValidateButton(); String expectedErrorMessage = PluginPropertyUtils.errorProp(E2ETestConstants.ERROR_MSG_GCS_INVALID_BUCKET_NAME) - .replace("BUCKET_NAME", "/" + PluginPropertyUtils.pluginProp(bucketName)); + .replace("BUCKET_NAME", PluginPropertyUtils.pluginProp(bucketName)); String actualErrorMessage = PluginPropertyUtils.findPropertyErrorElement(property).getText(); Assert.assertEquals(expectedErrorMessage, actualErrorMessage); } diff --git a/src/e2e-test/resources/errorMessage.properties b/src/e2e-test/resources/errorMessage.properties index 45ce14b7de..40829387ff 100644 --- a/src/e2e-test/resources/errorMessage.properties +++ b/src/e2e-test/resources/errorMessage.properties @@ -18,7 +18,7 @@ errorMessageIncorrectBQBucketName=Bucket name 'VALUE' can only contain lowercase errorMessageIncorrectBQTableName=Table name 'VALUE' can only contain letters (lower or uppercase), numbers, '_' and '-'. errorMessageIncorrectBQProperty=PROPERTY name 'VALUE' can only contain letters (lower or uppercase), numbers and '_'. errorMessageIncorrectDatasetName=Dataset name 'VALUE' can only contain letters (lower or uppercase), numbers and '_'. -errorMessageInvalidPath=Error when trying to detect schema: Input path not found +errorMessageInvalidPath=Error when trying to detect schema, java.io.IOException: Input path not found errorMessageBQExecuteTableDataset=Dataset and table must be specified together. errorMessageIncorrectMinimumSplitSize=Unable to create config for batchsource GCSFile 'minSplitSize' is invalid: Value of field class io.cdap.plugin.gcp.gcs.source.GCSSource$GCSSourceConfig.minSplitSize is expected to be a number. errorMessageIncorrectMaximumSplitSize=Unable to create config for batchsource GCSFile 'maxSplitSize' is invalid: Value of field class io.cdap.plugin.format.plugin.AbstractFileSourceConfig.maxSplitSize is expected to be a number.