forked from data-integrations/google-cloud
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GCS Sink additional scenarios. #2
Open
bijay27bit
wants to merge
1
commit into
develop
Choose a base branch
from
E2EgcsNewChangesSink_BT
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
76 changes: 76 additions & 0 deletions
76
src/e2e-test/features/gcs/sink/BigQueryToGCSSink_WithMacro.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
@GCS_Sink | ||
Feature: GCS sink - Verification of GCS Sink plugin macro scenarios | ||
|
||
@BQ_SOURCE_DATATYPE_TEST @GCS_SINK_TEST | ||
Scenario:Validate successful records transfer from BigQuery to GCS sink with macro fields | ||
Given Open Datafusion Project to configure pipeline | ||
Then Select plugin: "BigQuery" from the plugins list as: "Source" | ||
When Expand Plugin group in the LHS plugins list: "Sink" | ||
When Select plugin: "GCS" from the plugins list as: "Sink" | ||
Then Open BigQuery source properties | ||
Then Enter BigQuery property reference name | ||
Then Enter BigQuery property projectId "projectId" | ||
Then Enter BigQuery property datasetProjectId "projectId" | ||
Then Override Service account details if set in environment variables | ||
Then Enter BigQuery property dataset "dataset" | ||
Then Enter BigQuery source property table name | ||
Then Validate output schema with expectedSchema "bqSourceSchemaDatatype" | ||
Then Validate "BigQuery" plugin properties | ||
Then Close the BigQuery properties | ||
Then Open GCS sink properties | ||
Then Override Service account details if set in environment variables | ||
Then Enter the GCS sink mandatory properties | ||
Then Enter GCS property "projectId" as macro argument "gcsProjectId" | ||
Then Enter GCS property "serviceAccountType" as macro argument "serviceAccountType" | ||
Then Enter GCS property "serviceAccountFilePath" as macro argument "serviceAccount" | ||
Then Enter GCS property "path" as macro argument "gcsSinkPath" | ||
Then Enter GCS sink property "pathSuffix" as macro argument "gcsPathSuffix" | ||
Then Enter GCS property "format" as macro argument "gcsFormat" | ||
Then Click on the Macro button of Property: "writeHeader" and set the value to: "WriteHeader" | ||
Then Click on the Macro button of Property: "location" and set the value to: "gcsSinkLocation" | ||
Then Click on the Macro button of Property: "contentType" and set the value to: "gcsContentType" | ||
Then Click on the Macro button of Property: "outputFileNameBase" and set the value to: "OutFileNameBase" | ||
Then Click on the Macro button of Property: "fileSystemProperties" and set the value to: "FileSystemPr" | ||
Then Validate "GCS" plugin properties | ||
Then Close the GCS properties | ||
Then Connect source as "BigQuery" and sink as "GCS" to establish connection | ||
Then Save the pipeline | ||
Then Preview and run the pipeline | ||
Then Enter runtime argument value "projectId" for key "gcsProjectId" | ||
Then Enter runtime argument value "serviceAccountType" for key "serviceAccountType" | ||
Then Enter runtime argument value "serviceAccount" for key "serviceAccount" | ||
Then Enter runtime argument value for GCS sink property path key "gcsSinkPath" | ||
Then Enter runtime argument value "gcsPathDateSuffix" for key "gcsPathSuffix" | ||
Then Enter runtime argument value "jsonFormat" for key "gcsFormat" | ||
Then Enter runtime argument value "writeHeader" for key "WriteHeader" | ||
Then Enter runtime argument value "contentType" for key "gcsContentType" | ||
Then Enter runtime argument value "gcsSinkBucketLocation" for key "gcsSinkLocation" | ||
Then Enter runtime argument value "outputFileNameBase" for key "OutFileNameBase" | ||
Then Enter runtime argument value "gcsCSVFileSysProperty" for key "FileSystemPr" | ||
Then Run the preview of pipeline with runtime arguments | ||
Then Wait till pipeline preview is in running state | ||
Then Open and capture pipeline preview logs | ||
Then Verify the preview run status of pipeline in the logs is "succeeded" | ||
Then Close the pipeline logs | ||
Then Click on preview data for GCS sink | ||
Then Verify preview output schema matches the outputSchema captured in properties | ||
Then Close the preview data | ||
Then Deploy the pipeline | ||
Then Run the Pipeline in Runtime | ||
Then Enter runtime argument value "projectId" for key "gcsProjectId" | ||
Then Enter runtime argument value "serviceAccountType" for key "serviceAccountType" | ||
Then Enter runtime argument value "serviceAccount" for key "serviceAccount" | ||
Then Enter runtime argument value for GCS sink property path key "gcsSinkPath" | ||
Then Enter runtime argument value "gcsPathDateSuffix" for key "gcsPathSuffix" | ||
Then Enter runtime argument value "jsonFormat" for key "gcsFormat" | ||
Then Enter runtime argument value "writeHeader" for key "WriteHeader" | ||
Then Enter runtime argument value "contentType" for key "gcsContentType" | ||
Then Enter runtime argument value "gcsSinkBucketLocation" for key "gcsSinkLocation" | ||
Then Enter runtime argument value "outputFileNameBase" for key "OutFileNameBase" | ||
Then Enter runtime argument value "gcsCSVFileSysProperty" for key "FileSystemPr" | ||
Then Run the Pipeline in Runtime with runtime arguments | ||
Then Wait till pipeline is in running state | ||
Then Open and capture logs | ||
Then Verify the pipeline status is "Succeeded" | ||
Then Verify data is transferred to target GCS bucket | ||
Then Validate the values of records transferred to GCS bucket is equal to the values from source BigQuery table |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,3 +65,39 @@ Feature: GCS sink - Verify GCS Sink plugin error scenarios | |
Then Select GCS property format "csv" | ||
Then Click on the Validate button | ||
Then Verify that the Plugin Property: "format" is displaying an in-line error message: "errorMessageInvalidFormat" | ||
|
||
@BQ_SOURCE_TEST @GCS_SINK_TEST | ||
Scenario: To verify and validate the Error message in pipeline logs after deploy with invalid bucket path | ||
Given Open Datafusion Project to configure pipeline | ||
When Select plugin: "BigQuery" from the plugins list as: "Source" | ||
When Expand Plugin group in the LHS plugins list: "Sink" | ||
When Select plugin: "GCS" from the plugins list as: "Sink" | ||
Then Connect source as "BigQuery" and sink as "GCS" to establish connection | ||
Then Open BigQuery source properties | ||
Then Enter the BigQuery source mandatory properties | ||
Then Validate "BigQuery" plugin properties | ||
Then Close the BigQuery properties | ||
Then Open GCS sink properties | ||
Then Enter GCS property projectId and reference name | ||
Then Enter GCS property "path" as macro argument "gcsSinkPath" | ||
Then Select GCS property format "csv" | ||
Then Click on the Validate button | ||
Then Close the GCS properties | ||
Then Save the pipeline | ||
Then Preview and run the pipeline | ||
Then Enter runtime argument value "gcsInvalidBucketNameSink" for key "gcsSinkPath" | ||
Then Run the preview of pipeline with runtime arguments | ||
Then Wait till pipeline preview is in running state | ||
Then Open and capture pipeline preview logs | ||
Then Close the pipeline logs | ||
Then Close the preview | ||
Then Deploy the pipeline | ||
Then Run the Pipeline in Runtime | ||
Then Enter runtime argument value "gcsInvalidBucketNameSink" for key "gcsSinkPath" | ||
Then Run the Pipeline in Runtime with runtime arguments | ||
Then Wait till pipeline is in running state | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add Open and capture and close logs steps |
||
Then Verify the pipeline status is "Failed" | ||
Then Open Pipeline logs and verify Log entries having below listed Level and Message: | ||
| Level | Message | | ||
| ERROR | errorMessageInvalidBucketNameSink | | ||
Then Close the pipeline logs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the validation steps in all the scenarios.