forked from data-integrations/database-plugins
-
Notifications
You must be signed in to change notification settings - Fork 3
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
e2e Tests for cloudSQL-MySQL #7
Open
Vipinofficial11
wants to merge
8
commits into
develop
Choose a base branch
from
CloudSql-e2e
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
Show all changes
8 commits
Select commit
Hold shift + click to select a range
def8ed2
e2e Tests for cloudSQL-MySQL
Ishakaushik-cloud 46b7c59
macro validation
Ishakaushik-cloud 0bd19ae
e2e Tests for cloudSQL-MySQL
Ishakaushik-cloud 9fcc646
CloudSql My Sql e2e tests
priyabhatnagar25 70ee2bc
bq validation
Ishakaushik-cloud 67e6e49
CloudSql My Sql Sink Run Time Scenarios e2e tests
priyabhatnagar25 86d084d
Merge remote-tracking branch 'origin/CloudSql-e2e' into CloudSql-e2e
priyabhatnagar25 b6c555b
bq validation
priyabhatnagar25 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
66 changes: 66 additions & 0 deletions
66
cloudsql-mysql-plugin/src/e2e-test/features/sink/CloudMySqlDesignTime.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,66 @@ | ||
# Copyright © 2023 Cask Data, Inc. | ||
## | ||
## Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
## use this file except in compliance with the License. You may obtain a copy of | ||
## the License at | ||
## | ||
## http://www.apache.org/licenses/LICENSE-2.0 | ||
## | ||
## Unless required by applicable law or agreed to in writing, software | ||
## distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
## WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
## License for the specific language governing permissions and limitations under | ||
# the License.. | ||
|
||
@CloudMySql | ||
Feature: CloudMySql sink- Verify CloudMySql sink plugin design time scenarios | ||
|
||
Scenario: To verify CloudMySql sink plugin validation with mandatory properties | ||
Given Open Datafusion Project to configure pipeline | ||
When Expand Plugin group in the LHS plugins list: "Sink" | ||
When Select plugin: "CloudSQL MySQL" from the plugins list as: "Sink" | ||
Then Navigate to the properties page of plugin: "CloudSQL MySQL" | ||
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "cloudsql-mysql" | ||
Then Select radio button plugin property: "instanceType" with value: "public" | ||
Then Enter input plugin property: "connectionName" with value: "ConnectionName" | ||
Then Enter input plugin property: "referenceName" with value: "RefName" | ||
Then Enter input plugin property: "database" with value: "TestDatabase" | ||
Then Enter input plugin property: "tableName" with value: "mytable" | ||
Then Validate "CloudSQL MySQL" plugin properties | ||
Then Close the Plugin Properties page | ||
|
||
Scenario: To verify CloudMySql sink plugin validation with connection and basic details for connectivity | ||
Given Open Datafusion Project to configure pipeline | ||
When Expand Plugin group in the LHS plugins list: "Sink" | ||
When Select plugin: "CloudSQL MySQL" from the plugins list as: "Sink" | ||
Then Navigate to the properties page of plugin: "CloudSQL MySQL" | ||
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "cloudsql-mysql" | ||
Then Select radio button plugin property: "instanceType" with value: "public" | ||
Then Enter input plugin property: "connectionName" with value: "ConnectionName" | ||
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields | ||
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields | ||
Then Enter key value pairs for plugin property: "connectionArguments" with values from json: "connectionArgumentsList" | ||
Then Enter input plugin property: "referenceName" with value: "RefName" | ||
Then Enter input plugin property: "database" with value: "TestDatabase" | ||
Then Enter input plugin property: "tableName" with value: "mytable" | ||
Then Validate "CloudSQL MySQL" plugin properties | ||
Then Close the Plugin Properties page | ||
|
||
Scenario: To verify CloudMySql source plugin validation setting up connection arguments | ||
Given Open Datafusion Project to configure pipeline | ||
When Expand Plugin group in the LHS plugins list: "Sink" | ||
When Select plugin: "CloudSQL MySQL" from the plugins list as: "Sink" | ||
Then Navigate to the properties page of plugin: "CloudSQL MySQL" | ||
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "cloudsql-mysql" | ||
Then Select radio button plugin property: "instanceType" with value: "public" | ||
Then Enter input plugin property: "connectionName" with value: "ConnectionName" | ||
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields | ||
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields | ||
Then Enter key value pairs for plugin property: "connectionArguments" with values from json: "connectionArgumentsList" | ||
Then Enter input plugin property: "referenceName" with value: "referencename" | ||
Then Enter input plugin property: "database" with value: "DatabaseName" | ||
Then Enter textarea plugin property: "importQuery" with value: "insertQuery" | ||
Then Click on the Get Schema button | ||
Then Validate "CloudSQL MySQL" plugin properties | ||
Then Close the Plugin Properties page | ||
|
129 changes: 129 additions & 0 deletions
129
cloudsql-mysql-plugin/src/e2e-test/features/sink/CloudMySqlDesignTimeValidation.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,129 @@ | ||
# Copyright © 2023 Cask Data, Inc. | ||
## | ||
## Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
## use this file except in compliance with the License. You may obtain a copy of | ||
## the License at | ||
## | ||
## http://www.apache.org/licenses/LICENSE-2.0 | ||
## | ||
## Unless required by applicable law or agreed to in writing, software | ||
## distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
## WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
## License for the specific language governing permissions and limitations under | ||
# the License.. | ||
|
||
@CloudMySql | ||
Feature: CloudMySql sink- Verify CloudsqlMysql sink plugin design time validation scenarios | ||
|
||
Scenario: To verify CloudMySql sink plugin validation error message with invalid database | ||
Given Open Datafusion Project to configure pipeline | ||
When Expand Plugin group in the LHS plugins list: "Source" | ||
When Select plugin: "CloudSQL MySQL" from the plugins list as: "Source" | ||
When Expand Plugin group in the LHS plugins list: "Sink" | ||
When Select plugin: "CloudSQL MySQL" from the plugins list as: "Sink" | ||
Then Connect plugins: "CloudSQL MySQL" and "CloudSQL MySQL2" to establish connection | ||
Then Navigate to the properties page of plugin: "CloudSQL MySQL" | ||
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "cloudsql-mysql" | ||
Then Select radio button plugin property: "instanceType" with value: "public" | ||
Then Replace input plugin property: "connectionName" with value: "connectionName" for Credentials and Authorization related fields | ||
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields | ||
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields | ||
Then Enter input plugin property: "referenceName" with value: "RefName" | ||
Then Enter input plugin property: "database" with value: "TestDatabase" | ||
Then Enter textarea plugin property: "importQuery" with value: "insertQuery" | ||
Then Click on the Get Schema button | ||
Then Verify the Output Schema matches the Expected Schema: "outputSchema" | ||
Then Validate "CloudSQL MySQL" plugin properties | ||
Then Close the Plugin Properties page | ||
Then Navigate to the properties page of plugin: "CloudSQL MySQL2" | ||
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "cloudsql-mysql" | ||
Then Select radio button plugin property: "instanceType" with value: "public" | ||
Then Enter input plugin property: "connectionName" with value: "ConnectionName" | ||
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields | ||
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields | ||
Then Enter input plugin property: "referenceName" with value: "RefName" | ||
Then Enter input plugin property: "database" with value: "invalidDatabaseName" | ||
Then Enter input plugin property: "tableName" with value: "mytable" | ||
Then Click on the Validate button | ||
Then Verify that the Plugin is displaying an error message: "errorMessageInvalidSinkDatabase" on the header | ||
|
||
Scenario: To verify CloudMySql sink plugin validation error message with invalid tablename | ||
Given Open Datafusion Project to configure pipeline | ||
When Expand Plugin group in the LHS plugins list: "Source" | ||
When Select plugin: "CloudSQL MySQL" from the plugins list as: "Source" | ||
When Expand Plugin group in the LHS plugins list: "Sink" | ||
When Select plugin: "CloudSQL MySQL" from the plugins list as: "Sink" | ||
Then Connect plugins: "CloudSQL MySQL" and "CloudSQL MySQL2" to establish connection | ||
Then Navigate to the properties page of plugin: "CloudSQL MySQL" | ||
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "cloudsql-mysql" | ||
Then Select radio button plugin property: "instanceType" with value: "public" | ||
Then Replace input plugin property: "connectionName" with value: "connectionName" for Credentials and Authorization related fields | ||
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields | ||
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields | ||
Then Enter input plugin property: "referenceName" with value: "RefName" | ||
Then Enter input plugin property: "database" with value: "TestDatabase" | ||
Then Enter textarea plugin property: "importQuery" with value: "insertQuery" | ||
Then Click on the Get Schema button | ||
Then Verify the Output Schema matches the Expected Schema: "outputSchema" | ||
Then Validate "CloudSQL MySQL" plugin properties | ||
Then Close the Plugin Properties page | ||
Then Navigate to the properties page of plugin: "CloudSQL MySQL2" | ||
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "cloudsql-mysql" | ||
Then Select radio button plugin property: "instanceType" with value: "public" | ||
Then Replace input plugin property: "connectionName" with value: "connectionName" for Credentials and Authorization related fields | ||
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields | ||
Then Enter input plugin property: "referenceName" with value: "invalidRefName" | ||
Then Enter input plugin property: "database" with value: "TestDatabase" | ||
Then Enter input plugin property: "tableName" with value: "Invalidtable" | ||
Then Click on the Validate button | ||
Then Verify that the Plugin Property: "table" is displaying an in-line error message: "errorMessageInvalidTableName" | ||
|
||
Scenario: To verify CloudMySql sink plugin validation error message with invalid reference Name | ||
Given Open Datafusion Project to configure pipeline | ||
When Expand Plugin group in the LHS plugins list: "Sink" | ||
When Select plugin: "CloudSQL MySQL" from the plugins list as: "Sink" | ||
Then Navigate to the properties page of plugin: "CloudSQL MySQL" | ||
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "cloudsql-mysql" | ||
Then Select radio button plugin property: "instanceType" with value: "public" | ||
Then Replace input plugin property: "connectionName" with value: "connectionName" for Credentials and Authorization related fields | ||
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields | ||
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields | ||
Then Enter input plugin property: "referenceName" with value: "invalidRef" | ||
Then Enter key value pairs for plugin property: "connectionArguments" with values from json: "connectionArgumentsList" | ||
Then Enter input plugin property: "database" with value: "TestDatabase" | ||
Then Enter input plugin property: "tableName" with value: "mytable" | ||
Then Click on the Validate button | ||
Then Verify that the Plugin Property: "referenceName" is displaying an in-line error message: "errorMessageCloudMySqlInvalidReferenceName" | ||
|
||
Scenario: To verify CloudMySql sink plugin validation error message with blank username | ||
Given Open Datafusion Project to configure pipeline | ||
When Expand Plugin group in the LHS plugins list: "Sink" | ||
When Select plugin: "CloudSQL MySQL" from the plugins list as: "Sink" | ||
Then Navigate to the properties page of plugin: "CloudSQL MySQL" | ||
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "cloudsql-mysql" | ||
Then Select radio button plugin property: "instanceType" with value: "public" | ||
Then Replace input plugin property: "connectionName" with value: "connectionName" for Credentials and Authorization related fields | ||
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields | ||
Then Enter key value pairs for plugin property: "connectionArguments" with values from json: "connectionArgumentsList" | ||
Then Enter input plugin property: "referenceName" with value: "RefName" | ||
Then Enter input plugin property: "database" with value: "TestDatabase" | ||
Then Enter input plugin property: "tableName" with value: "mytable" | ||
Then Click on the Validate button | ||
Then Verify that the Plugin Property: "user" is displaying an in-line error message: "errorMessageBlankUsername" | ||
|
||
Scenario: To verify CloudMySql sink plugin validation error message with ConnectionName | ||
Given Open Datafusion Project to configure pipeline | ||
When Expand Plugin group in the LHS plugins list: "Sink" | ||
When Select plugin: "CloudSQL MySQL" from the plugins list as: "Sink" | ||
Then Navigate to the properties page of plugin: "CloudSQL MySQL" | ||
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "cloudsql-mysql" | ||
Then Select radio button plugin property: "instanceType" with value: "public" | ||
Then Enter input plugin property: "connectionName" with value: "cdf-athena:us-central1" | ||
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields | ||
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields | ||
Then Enter key value pairs for plugin property: "connectionArguments" with values from json: "connectionArgumentsList" | ||
Then Enter input plugin property: "referenceName" with value: "RefName" | ||
Then Enter input plugin property: "database" with value: "TestDatabase" | ||
Then Enter input plugin property: "tableName" with value: "mytable" | ||
Then Click on the Validate button | ||
Then Verify that the Plugin Property: "connectionName" is displaying an in-line error message: "errorMessageConnectionName" |
50 changes: 50 additions & 0 deletions
50
cloudsql-mysql-plugin/src/e2e-test/features/sink/CloudMySqlDesignTimeWithMacro.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,50 @@ | ||
# Copyright © 2023 Cask Data, Inc. | ||
## | ||
## Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
## use this file except in compliance with the License. You may obtain a copy of | ||
## the License at | ||
## | ||
## http://www.apache.org/licenses/LICENSE-2.0 | ||
## | ||
## Unless required by applicable law or agreed to in writing, software | ||
## distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
## WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
## License for the specific language governing permissions and limitations under | ||
# the License.. | ||
|
||
@CloudMySql | ||
Feature: CloudMySql sink- Verify CloudMySql sink plugin design time macro scenarios | ||
|
||
Scenario: To verify CloudMySql sink plugin validation with macro enabled fields for connection section | ||
Given Open Datafusion Project to configure pipeline | ||
When Expand Plugin group in the LHS plugins list: "Sink" | ||
When Select plugin: "CloudSQL MySQL" from the plugins list as: "Sink" | ||
Then Navigate to the properties page of plugin: "CloudSQL MySQL" | ||
Then Click on the Macro button of Property: "jdbcPluginName" and set the value to: "cloudsql-mysql" | ||
Then Replace input plugin property: "connectionName" with value: "connectionName" for Credentials and Authorization related fields | ||
Then Select radio button plugin property: "instanceType" with value: "public" | ||
Then Click on the Macro button of Property: "user" and set the value to: "username" | ||
Then Click on the Macro button of Property: "password" and set the value to: "password" | ||
Then Click on the Macro button of Property: "connectionArguments" and set the value to: "connectionArgumentsList" | ||
Then Enter input plugin property: "referenceName" with value: "sourceRef" | ||
Then Replace input plugin property: "database" with value: "TestDatabase" | ||
Then Click on the Validate button | ||
Then Validate "CloudSQL MySQL" plugin properties | ||
Then Close the Plugin Properties page | ||
|
||
Scenario: To verify cloudsql sink plugin validation with macro enabled fields for basic section | ||
Given Open Datafusion Project to configure pipeline | ||
When Expand Plugin group in the LHS plugins list: "Sink" | ||
When Select plugin: "CloudSQL MySQL" from the plugins list as: "Sink" | ||
Then Navigate to the properties page of plugin: "CloudSQL MySQL" | ||
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "cloudsql-mysql" | ||
Then Replace input plugin property: "connectionName" with value: "connectionName" for Credentials and Authorization related fields | ||
Then Select radio button plugin property: "instanceType" with value: "public" | ||
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields | ||
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields | ||
Then Enter input plugin property: "referenceName" with value: "sourceRef" | ||
Then Replace input plugin property: "database" with value: "TestDatabase" | ||
Then Click on the Macro button of Property: "tableName" and set the value to: "mytable" | ||
Then Click on the Validate button | ||
Then Validate "CloudSQL MySQL" plugin properties | ||
Then Close the Plugin Properties page |
Oops, something went wrong.
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.
There are more scenarios in the RTM where we are validating the plugin with different properties present in the plugin. Create more Design Time scenarios .
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.
I don't see this one addressed.
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.
done