Skip to content

Commit 109283b

Browse files
committed
e2e_CloudsqlPostgresql scenarios
1 parent 92795f1 commit 109283b

28 files changed

+1973
-779
lines changed

cloudsql-postgresql-plugin/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
<dependency>
5151
<groupId>com.google.guava</groupId>
5252
<artifactId>guava</artifactId>
53-
<version>23.0</version>
53+
<version>31.0.1-jre</version>
5454
</dependency>
5555
<!-- test dependencies -->
5656
<dependency>
Lines changed: 56 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,70 @@
1+
#
12
# Copyright © 2023 Cask Data, Inc.
2-
##
3-
## Licensed under the Apache License, Version 2.0 (the "License"); you may not
4-
## use this file except in compliance with the License. You may obtain a copy of
5-
## the License at
6-
##
7-
## http://www.apache.org/licenses/LICENSE-2.0
8-
##
9-
## Unless required by applicable law or agreed to in writing, software
10-
## distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11-
## WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12-
## License for the specific language governing permissions and limitations under
13-
# the License..
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
5+
# use this file except in compliance with the License. You may obtain a copy of
6+
# the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
# License for the specific language governing permissions and limitations under
14+
# the License.
15+
#
1416

15-
@CLOUDSQL
16-
Feature: CLOUDSQL Sink - Design time scenarios
17+
@Cloudsqlpostgresql_Sink @Cloudsqlpostgresql_Sink_Required
18+
Feature: CloudSQL-PostgreSQL sink - Verify CloudSQL-PostgreSQL sink plugin design time scenarios
1719

18-
@CLOUDSQL_SINK @CLOUDSQL_SINK_BASIC
19-
Scenario: To verify CLOUDSQL sink plugin validation with connection and basic details for connectivity
20+
Scenario: To verify CloudSQLPostgreSQL sink plugin validation with connection and basic details for connectivity
2021
Given Open Datafusion Project to configure pipeline
2122
When Expand Plugin group in the LHS plugins list: "Sink"
2223
When Select plugin: "CloudSQL PostgreSQL" from the plugins list as: "Sink"
2324
Then Navigate to the properties page of plugin: "CloudSQL PostgreSQL"
24-
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "cloudsql-postgresql"
25+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
2526
Then Select radio button plugin property: "instanceType" with value: "public"
2627
Then Replace input plugin property: "connectionName" with value: "connectionName"
27-
Then Replace input plugin property: "user" with value: "user" for Credentials and Authorization related fields
28+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
2829
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
29-
Then Enter input plugin property: "referenceName" with value: "RefName"
30-
Then Replace input plugin property: "database" with value: "test_automation_db"
31-
Then Replace input plugin property: "tableName" with value: "tableName"
32-
Then Replace input plugin property: "dbSchemaName" with value: "dbSchemaName"
30+
Then Enter input plugin property: "referenceName" with value: "targetRef"
31+
Then Replace input plugin property: "database" with value: "databaseName"
32+
Then Replace input plugin property: "tableName" with value: "targetTable"
33+
Then Replace input plugin property: "dbSchemaName" with value: "schema"
3334
Then Validate "CloudSQL PostgreSQL" plugin properties
3435
Then Close the Plugin Properties page
3536

36-
@CLOUDSQL_SINK @CLOUDSQL_CONNECTION_ARGUMENT
37-
Scenario: To verify CLOUDSQL sink plugin validation with connection argument
38-
Given Open Datafusion Project to configure pipeline
39-
When Expand Plugin group in the LHS plugins list: "Sink"
40-
When Select plugin: "CloudSQL PostgreSQL" from the plugins list as: "Sink"
41-
Then Navigate to the properties page of plugin: "CloudSQL PostgreSQL"
42-
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "cloudsql-postgresql"
43-
Then Select radio button plugin property: "instanceType" with value: "public"
44-
Then Replace input plugin property: "connectionName" with value: "connectionName"
45-
Then Replace input plugin property: "user" with value: "user" for Credentials and Authorization related fields
46-
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
47-
Then Enter key value pairs for plugin property: "connectionArguments" with values from json: "connectionArgumentsList"
48-
Then Enter input plugin property: "referenceName" with value: "RefName"
49-
Then Replace input plugin property: "database" with value: "test_automation_db"
50-
Then Replace input plugin property: "tableName" with value: "tableName"
51-
Then Replace input plugin property: "dbSchemaName" with value: "dbSchemaName"
52-
Then Validate "CloudSQL PostgreSQL" plugin properties
53-
Then Close the Plugin Properties page
54-
55-
@CLOUDSQL_SINK @CLOUDSINK_REFERENCE
56-
Scenario: To verify CLOUDSQL sink plugin validation with Advanced details for connectivity
57-
Given Open Datafusion Project to configure pipeline
58-
When Expand Plugin group in the LHS plugins list: "Sink"
59-
When Select plugin: "CloudSQL PostgreSQL" from the plugins list as: "Sink"
60-
Then Navigate to the properties page of plugin: "CloudSQL PostgreSQL"
61-
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "cloudsql-postgresql"
62-
Then Select radio button plugin property: "instanceType" with value: "public"
63-
Then Replace input plugin property: "connectionName" with value: "connectionName"
64-
Then Replace input plugin property: "user" with value: "user" for Credentials and Authorization related fields
65-
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
66-
Then Enter key value pairs for plugin property: "connectionArguments" with values from json: "connectionArgumentsList"
67-
Then Enter input plugin property: "referenceName" with value: "RefName"
68-
Then Replace input plugin property: "database" with value: "test_automation_db"
69-
Then Replace input plugin property: "tableName" with value: "tableName"
70-
Then Replace input plugin property: "dbSchemaName" with value: "dbSchemaName"
71-
Then Select dropdown plugin property: "transactionIsolationLevel" with option value: "transactionLevel"
72-
Then Replace input plugin property: "connectionTimeout" with value: "connectionTimeout"
73-
Then Validate "CloudSQL PostgreSQL" plugin properties
74-
Then Close the Plugin Properties page
75-
37+
Scenario: To verify CloudSQLPostgreSQL sink plugin validation with connection arguments
38+
Given Open Datafusion Project to configure pipeline
39+
When Expand Plugin group in the LHS plugins list: "Sink"
40+
When Select plugin: "CloudSQL PostgreSQL" from the plugins list as: "Sink"
41+
Then Navigate to the properties page of plugin: "CloudSQL PostgreSQL"
42+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
43+
Then Select radio button plugin property: "instanceType" with value: "public"
44+
Then Replace input plugin property: "connectionName" with value: "connectionName"
45+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
46+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
47+
Then Enter input plugin property: "referenceName" with value: "targetRef"
48+
Then Replace input plugin property: "database" with value: "databaseName"
49+
Then Replace input plugin property: "tableName" with value: "targetTable"
50+
Then Replace input plugin property: "dbSchemaName" with value: "schema"
51+
Then Enter key value pairs for plugin property: "connectionArguments" with values from json: "connectionArgumentsList"
52+
Then Validate "CloudSQL PostgreSQL" plugin properties
53+
Then Close the Plugin Properties page
7654

55+
Scenario: To verify CloudSQLPostgreSQL sink plugin validation with advanced details with connection timeout
56+
Given Open Datafusion Project to configure pipeline
57+
When Expand Plugin group in the LHS plugins list: "Sink"
58+
When Select plugin: "CloudSQL PostgreSQL" from the plugins list as: "Sink"
59+
Then Navigate to the properties page of plugin: "CloudSQL PostgreSQL"
60+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
61+
Then Select radio button plugin property: "instanceType" with value: "public"
62+
Then Replace input plugin property: "connectionName" with value: "connectionName"
63+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
64+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
65+
Then Enter input plugin property: "referenceName" with value: "targetRef"
66+
Then Replace input plugin property: "database" with value: "databaseName"
67+
Then Replace input plugin property: "tableName" with value: "targetTable"
68+
Then Replace input plugin property: "connectionTimeout" with value: "connectionTimeout"
69+
Then Validate "CloudSQL PostgreSQL" plugin properties
70+
Then Close the Plugin Properties page
Lines changed: 34 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,53 @@
1+
#
12
# Copyright © 2023 Cask Data, Inc.
2-
##
3-
## Licensed under the Apache License, Version 2.0 (the "License"); you may not
4-
## use this file except in compliance with the License. You may obtain a copy of
5-
## the License at
6-
##
7-
## http://www.apache.org/licenses/LICENSE-2.0
8-
##
9-
## Unless required by applicable law or agreed to in writing, software
10-
## distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11-
## WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12-
## License for the specific language governing permissions and limitations under
13-
# the License..
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
5+
# use this file except in compliance with the License. You may obtain a copy of
6+
# the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
# License for the specific language governing permissions and limitations under
14+
# the License.
15+
#
1416

15-
@CLOUDSQL
16-
Feature: CLOUDSQL Sink - Design time with Macros
17+
@Cloudsqlpostgresql_Sink @Cloudsqlpostgresql_Sink_Required
18+
Feature: CloudSQL-PostgreSQL sink- Verify CloudSQL-PostgreSQL sink plugin design time macro scenarios
1719

18-
@CLOUDSQL_SINK @CLOUDSQL_SINK_BASIC
19-
Scenario: To verify CLOUDSQL sink plugin validation with basic details for connectivity
20+
Scenario: To verify CloudSQLPostgreSQL sink plugin validation with macro enabled fields for connection section
2021
Given Open Datafusion Project to configure pipeline
21-
When Select plugin: "CloudSQL PostgreSQL" from the plugins list as: "Source"
2222
When Expand Plugin group in the LHS plugins list: "Sink"
2323
When Select plugin: "CloudSQL PostgreSQL" from the plugins list as: "Sink"
24-
Then Connect plugins: "CloudSQL PostgreSQL" and "CloudSQL PostgreSQL2" to establish connection
2524
Then Navigate to the properties page of plugin: "CloudSQL PostgreSQL"
26-
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "cloudsql-postgresql"
25+
Then Click on the Macro button of Property: "jdbcPluginName" and set the value to: "cloudSQLPostGreSQLDriverName"
2726
Then Select radio button plugin property: "instanceType" with value: "public"
28-
Then Replace input plugin property: "connectionName" with value: "cdf-athena:europe-west1:cloud-postgresql-automation"
29-
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
30-
Then Enter input plugin property: "password" with value: "password" for Credentials and Authorization related fields
31-
Then Enter input plugin property: "referenceName" with value: "RefName"
32-
Then Replace input plugin property: "database" with value: "test_automation_db"
33-
Then Enter textarea plugin property: "importQuery" with value: "selectQuery"
34-
Then Click on the Get Schema button
35-
Then Verify the Output Schema matches the Expected Schema: "outputSchema"
27+
Then Replace input plugin property: "connectionName" with value: "connectionName"
28+
Then Click on the Macro button of Property: "user" and set the value to: "cloudSQLPostGreSQLUser"
29+
Then Click on the Macro button of Property: "password" and set the value to: "cloudSQLPostGreSQLPassword"
30+
Then Click on the Macro button of Property: "connectionArguments" and set the value to: "cloudSQLPostGreSQLConnectionArguments"
31+
Then Enter input plugin property: "referenceName" with value: "targetRef"
32+
Then Replace input plugin property: "database" with value: "databaseName"
33+
Then Replace input plugin property: "tableName" with value: "targetTable"
34+
Then Replace input plugin property: "dbSchemaName" with value: "schema"
3635
Then Validate "CloudSQL PostgreSQL" plugin properties
3736
Then Close the Plugin Properties page
38-
Then Navigate to the properties page of plugin: "CloudSQL PostgreSQL2"
39-
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "cloudsql-postgresql"
40-
Then Select radio button plugin property: "instanceType" with value: "public"
41-
Then Replace input plugin property: "connectionName" with value: "connectionName"
42-
# Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
43-
# Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
44-
Then Enter input plugin property: "referenceName" with value: "RefName"
45-
Then Replace input plugin property: "database" with value: "test_automation_db"
46-
Then Click on the Macro button of Property: "tableName" and set the value to: "newtable"
47-
Then Click on the Macro button of Property: "dbSchemaName" and set the value to: "schema"
48-
Then Validate "CloudSQL PostgreSQL2" plugin properties
4937

50-
@CLOUDSQL_SINK @CLOUDSQL_SINK_CONNECTION
51-
Scenario: To verify CLOUDSQL sink plugin validation with connection details for connectivity
38+
Scenario: To verify CloudSQLPostgreSQL sink plugin validation with macro enabled fields for basic section
5239
Given Open Datafusion Project to configure pipeline
53-
When Select plugin: "CloudSQL PostgreSQL" from the plugins list as: "Source"
5440
When Expand Plugin group in the LHS plugins list: "Sink"
5541
When Select plugin: "CloudSQL PostgreSQL" from the plugins list as: "Sink"
56-
Then Connect plugins: "CloudSQL PostgreSQL" and "CloudSQL PostgreSQL2" to establish connection
5742
Then Navigate to the properties page of plugin: "CloudSQL PostgreSQL"
58-
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "cloudsql-postgresql"
43+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
5944
Then Select radio button plugin property: "instanceType" with value: "public"
60-
Then Replace input plugin property: "connectionName" with value: "cdf-athena:europe-west1:cloud-postgresql-automation"
45+
Then Replace input plugin property: "connectionName" with value: "connectionName"
6146
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
62-
Then Enter input plugin property: "password" with value: "password" for Credentials and Authorization related fields
63-
Then Enter input plugin property: "referenceName" with value: "RefName"
64-
Then Replace input plugin property: "database" with value: "test_automation_db"
65-
Then Enter textarea plugin property: "importQuery" with value: "selectQuery"
66-
Then Click on the Get Schema button
67-
Then Verify the Output Schema matches the Expected Schema: "outputSchema"
47+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
48+
Then Enter input plugin property: "referenceName" with value: "targetRef"
49+
Then Replace input plugin property: "database" with value: "databaseName"
50+
Then Click on the Macro button of Property: "tableName" and set the value to: "cloudSQLPostGreSQLTableName"
51+
Then Click on the Macro button of Property: "dbSchemaName" and set the value to: "cloudSQLPostGreSQLSchemaName"
6852
Then Validate "CloudSQL PostgreSQL" plugin properties
6953
Then Close the Plugin Properties page
70-
Then Navigate to the properties page of plugin: "CloudSQL PostgreSQL2"
71-
Then Click on the Macro button of Property: "select-jdbcPluginName" and set the value in textarea: "abcd"
72-
Then Select radio button plugin property: "instanceType" with value: "public"
73-
Then Replace input plugin property: "connectionName" with value: "cdf-athena:europe-west1:cloud-postgresql-automation"
74-
Then Click on the Macro button of Property: "user" and set the value to: "user"
75-
Then Click on the Macro button of Property: "password" and set the value to: "password"
76-
Then Click on the Macro button of Property: "connectionArguments" and set the value to: "1,key"
77-
Then Enter input plugin property: "referenceName" with value: "RefName"
78-
Then Replace input plugin property: "database" with value: "test_automation_db"
79-
Then Replace input plugin property: "tableName" with value: "tableName"
80-
Then Replace input plugin property: "dbSchemaName" with value: "dbSchemaName"
81-
Then Validate "CloudSQL PostgreSQL2" plugin properties

0 commit comments

Comments
 (0)