-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7242f30
commit 495d4a1
Showing
28 changed files
with
2,515 additions
and
2 deletions.
There are no files selected for viewing
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
70 changes: 70 additions & 0 deletions
70
cloudsql-postgresql-plugin/src/e2e-test/features/sink/DesignTime.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,70 @@ | ||
# | ||
# 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. | ||
# | ||
|
||
@Regression @Sink_Required | ||
Feature: CloudSQL-PostgreSQL sink - Verify CloudSQL-PostgreSQL sink plugin design time scenarios | ||
|
||
Scenario: To verify CloudSQLPostgreSQL 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 PostgreSQL" from the plugins list as: "Sink" | ||
Then Navigate to the properties page of plugin: "CloudSQL PostgreSQL" | ||
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName" | ||
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: "targetRef" | ||
Then Replace input plugin property: "database" with value: "databaseName" | ||
Then Replace input plugin property: "tableName" with value: "targetTable" | ||
Then Replace input plugin property: "dbSchemaName" with value: "schema" | ||
Then Validate "CloudSQL PostgreSQL" plugin properties | ||
Then Close the Plugin Properties page | ||
|
||
Scenario: To verify CloudSQLPostgreSQL sink plugin validation with connection arguments | ||
Given Open Datafusion Project to configure pipeline | ||
When Expand Plugin group in the LHS plugins list: "Sink" | ||
When Select plugin: "CloudSQL PostgreSQL" from the plugins list as: "Sink" | ||
Then Navigate to the properties page of plugin: "CloudSQL PostgreSQL" | ||
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName" | ||
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: "targetRef" | ||
Then Replace input plugin property: "database" with value: "databaseName" | ||
Then Replace input plugin property: "tableName" with value: "targetTable" | ||
Then Replace input plugin property: "dbSchemaName" with value: "schema" | ||
Then Enter key value pairs for plugin property: "connectionArguments" with values from json: "connectionArgumentsList" | ||
Then Validate "CloudSQL PostgreSQL" plugin properties | ||
Then Close the Plugin Properties page | ||
|
||
Scenario: To verify CloudSQLPostgreSQL sink plugin validation with advanced details with connection timeout | ||
Given Open Datafusion Project to configure pipeline | ||
When Expand Plugin group in the LHS plugins list: "Sink" | ||
When Select plugin: "CloudSQL PostgreSQL" from the plugins list as: "Sink" | ||
Then Navigate to the properties page of plugin: "CloudSQL PostgreSQL" | ||
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName" | ||
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: "targetRef" | ||
Then Replace input plugin property: "database" with value: "databaseName" | ||
Then Replace input plugin property: "tableName" with value: "targetTable" | ||
Then Replace input plugin property: "connectionTimeout" with value: "connectionTimeout" | ||
Then Validate "CloudSQL PostgreSQL" plugin properties | ||
Then Close the Plugin Properties page |
53 changes: 53 additions & 0 deletions
53
cloudsql-postgresql-plugin/src/e2e-test/features/sink/DesignTimeWithMacros.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,53 @@ | ||
# | ||
# 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. | ||
# | ||
|
||
@Regression @Sink_Required | ||
Feature: CloudSQL-PostgreSQL sink- Verify CloudSQL-PostgreSQL sink plugin design time macro scenarios | ||
|
||
Scenario: To verify CloudSQLPostgreSQL 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 PostgreSQL" from the plugins list as: "Sink" | ||
Then Navigate to the properties page of plugin: "CloudSQL PostgreSQL" | ||
Then Click on the Macro button of Property: "jdbcPluginName" and set the value to: "cloudSQLPostGreSQLDriverName" | ||
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 Click on the Macro button of Property: "user" and set the value to: "cloudSQLPostGreSQLUser" | ||
Then Click on the Macro button of Property: "password" and set the value to: "cloudSQLPostGreSQLPassword" | ||
Then Click on the Macro button of Property: "connectionArguments" and set the value to: "cloudSQLPostGreSQLConnectionArguments" | ||
Then Enter input plugin property: "referenceName" with value: "targetRef" | ||
Then Replace input plugin property: "database" with value: "databaseName" | ||
Then Replace input plugin property: "tableName" with value: "targetTable" | ||
Then Replace input plugin property: "dbSchemaName" with value: "schema" | ||
Then Validate "CloudSQL PostgreSQL" plugin properties | ||
Then Close the Plugin Properties page | ||
|
||
Scenario: To verify CloudSQLPostgreSQL 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 PostgreSQL" from the plugins list as: "Sink" | ||
Then Navigate to the properties page of plugin: "CloudSQL PostgreSQL" | ||
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName" | ||
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: "targetRef" | ||
Then Replace input plugin property: "database" with value: "databaseName" | ||
Then Click on the Macro button of Property: "tableName" and set the value to: "cloudSQLPostGreSQLTableName" | ||
Then Click on the Macro button of Property: "dbSchemaName" and set the value to: "cloudSQLPostGreSQLSchemaName" | ||
Then Validate "CloudSQL PostgreSQL" plugin properties | ||
Then Close the Plugin Properties page |
143 changes: 143 additions & 0 deletions
143
cloudsql-postgresql-plugin/src/e2e-test/features/sink/DesignTimeWithValidation.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,143 @@ | ||
# | ||
# 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. | ||
# | ||
|
||
@Regression @Sink_Required | ||
Feature: CloudSQL-PostgreSQL Sink - Verify CloudSQL-postgreSQL Sink Plugin Error scenarios | ||
|
||
Scenario:Verify CloudSQLPostgreSQL sink plugin validation errors for mandatory fields | ||
Given Open Datafusion Project to configure pipeline | ||
When Expand Plugin group in the LHS plugins list: "Sink" | ||
When Select plugin: "CloudSQL PostgreSQL" from the plugins list as: "Sink" | ||
Then Navigate to the properties page of plugin: "CloudSQL PostgreSQL" | ||
Then Click on the Validate button | ||
Then Verify mandatory property error for below listed properties: | ||
| jdbcPluginName | | ||
| referenceName | | ||
| database | | ||
| tableName | | ||
|
||
Scenario: To verify CloudSQLPostgreSQL sink plugin validation error message with invalid reference test data | ||
Given Open Datafusion Project to configure pipeline | ||
When Expand Plugin group in the LHS plugins list: "Sink" | ||
When Select plugin: "CloudSQL PostgreSQL" from the plugins list as: "Sink" | ||
Then Navigate to the properties page of plugin: "CloudSQL PostgreSQL" | ||
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName" | ||
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 Replace input plugin property: "database" with value: "databaseName" | ||
Then Replace input plugin property: "tableName" with value: "targetTable" | ||
Then Click on the Validate button | ||
Then Verify that the Plugin Property: "referenceName" is displaying an in-line error message: "errorMessageCloudPostgreSQLInvalidReferenceName" | ||
|
||
Scenario: To verify CloudSQLPostgreSQL sink plugin validation error message with invalid connection name test data | ||
Given Open Datafusion Project to configure pipeline | ||
When Expand Plugin group in the LHS plugins list: "Sink" | ||
When Select plugin: "CloudSQL PostgreSQL" from the plugins list as: "Sink" | ||
Then Navigate to the properties page of plugin: "CloudSQL PostgreSQL" | ||
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName" | ||
Then Select radio button plugin property: "instanceType" with value: "public" | ||
Then Replace input plugin property: "connectionName" with value: "invalidConnectionName" | ||
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: "targetRef" | ||
Then Replace input plugin property: "database" with value: "databaseName" | ||
Then Replace input plugin property: "tableName" with value: "targetTable" | ||
Then Click on the Validate button | ||
Then Verify that the Plugin Property: "connectionName" is displaying an in-line error message: "errorMessageConnectionName" | ||
|
||
@CLOUDSQLPOSTGRESQL_SOURCE_TEST @CLOUDSQLPOSTGRESQL_TARGET_TEST | ||
Scenario: To verify CloudSQLPostgreSQL 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 PostgreSQL" from the plugins list as: "Source" | ||
When Expand Plugin group in the LHS plugins list: "Sink" | ||
When Select plugin: "CloudSQL PostgreSQL" from the plugins list as: "Sink" | ||
Then Connect plugins: "CloudSQL PostgreSQL" and "CloudSQL PostgreSQL2" to establish connection | ||
Then Navigate to the properties page of plugin: "CloudSQL PostgreSQL" | ||
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName" | ||
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: "sourceRef" | ||
Then Replace input plugin property: "database" with value: "databaseName" | ||
Then Enter textarea plugin property: "importQuery" with value: "selectQuery" | ||
Then Click on the Get Schema button | ||
Then Verify the Output Schema matches the Expected Schema: "datatypesSchema" | ||
Then Validate "CloudSQL PostgreSQL" plugin properties | ||
Then Close the Plugin Properties page | ||
Then Navigate to the properties page of plugin: "CloudSQL PostgreSQL2" | ||
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName" | ||
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 Replace input plugin property: "database" with value: "invalidDatabaseName" | ||
Then Replace input plugin property: "tableName" with value: "targetTable" | ||
Then Enter input plugin property: "referenceName" with value: "targetRef" | ||
Then Click on the Validate button | ||
Then Verify that the Plugin is displaying an error message: "errorMessageInvalidSinkDatabase" on the header | ||
|
||
@CLOUDSQLPOSTGRESQL_SOURCE_TEST @CLOUDSQLPOSTGRESQL_TARGET_TEST | ||
Scenario: To verify CloudSQLPostgreSQL sink plugin validation error message with invalid table name | ||
Given Open Datafusion Project to configure pipeline | ||
When Expand Plugin group in the LHS plugins list: "Source" | ||
When Select plugin: "CloudSQL PostgreSQL" from the plugins list as: "Source" | ||
When Expand Plugin group in the LHS plugins list: "Sink" | ||
When Select plugin: "CloudSQL PostgreSQL" from the plugins list as: "Sink" | ||
Then Connect plugins: "CloudSQL PostgreSQL" and "CloudSQL PostgreSQL2" to establish connection | ||
Then Navigate to the properties page of plugin: "CloudSQL PostgreSQL" | ||
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName" | ||
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: "sourceRef" | ||
Then Replace input plugin property: "database" with value: "databaseName" | ||
Then Enter textarea plugin property: "importQuery" with value: "selectQuery" | ||
Then Click on the Get Schema button | ||
Then Verify the Output Schema matches the Expected Schema: "datatypesSchema" | ||
Then Validate "CloudSQL PostgreSQL" plugin properties | ||
Then Close the Plugin Properties page | ||
Then Navigate to the properties page of plugin: "CloudSQL PostgreSQL2" | ||
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName" | ||
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: "targetRef" | ||
Then Replace input plugin property: "database" with value: "databaseName" | ||
Then Replace input plugin property: "tableName" with value: "invalidTable" | ||
Then Click on the Validate button | ||
Then Verify that the Plugin Property: "tableName" is displaying an in-line error message: "errorMessageInvalidTableName" | ||
|
||
Scenario: To verify CloudSQLPostgreSQL 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 PostgreSQL" from the plugins list as: "Sink" | ||
Then Navigate to the properties page of plugin: "CloudSQL PostgreSQL" | ||
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName" | ||
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: "targetRef" | ||
Then Replace input plugin property: "database" with value: "databaseName" | ||
Then Replace input plugin property: "tableName" with value: "targetTable" | ||
Then Click on the Validate button | ||
Then Verify that the Plugin Property: "user" is displaying an in-line error message: "errorMessageBlankUsername" |
Oops, something went wrong.