Skip to content

Commit 6905e24

Browse files
committed
cloudSql-mySql e2e
1 parent 7242f30 commit 6905e24

27 files changed

+2474
-1
lines changed

.github/workflows/e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
)
4141
strategy:
4242
matrix:
43-
module: [mysql-plugin, postgresql-plugin, oracle-plugin, mssql-plugin]
43+
module: [mysql-plugin, postgresql-plugin, oracle-plugin, mssql-plugin, cloudsql-mysql-plugin]
4444
fail-fast: false
4545

4646
steps:
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# 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..
14+
15+
@CloudMySql @CloudMySql_Required
16+
Feature: CloudMySql sink- Verify CloudMySql sink plugin design time scenarios
17+
18+
Scenario: To verify CloudMySql sink plugin validation with mandatory properties
19+
Given Open Datafusion Project to configure pipeline
20+
When Expand Plugin group in the LHS plugins list: "Sink"
21+
When Select plugin: "CloudSQL MySQL" from the plugins list as: "Sink"
22+
Then Navigate to the properties page of plugin: "CloudSQL MySQL"
23+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
24+
Then Select radio button plugin property: "instanceType" with value: "public"
25+
Then Replace input plugin property: "connectionName" with value: "connectionName" for Credentials and Authorization related fields
26+
Then Enter input plugin property: "referenceName" with value: "RefName"
27+
Then Enter input plugin property: "database" with value: "TestDatabase"
28+
Then Enter input plugin property: "tableName" with value: "mytable"
29+
Then Validate "CloudSQL MySQL" plugin properties
30+
Then Close the Plugin Properties page
31+
32+
Scenario: To verify CloudMySql sink plugin validation with connection and basic details for connectivity
33+
Given Open Datafusion Project to configure pipeline
34+
When Expand Plugin group in the LHS plugins list: "Sink"
35+
When Select plugin: "CloudSQL MySQL" from the plugins list as: "Sink"
36+
Then Navigate to the properties page of plugin: "CloudSQL MySQL"
37+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
38+
Then Select radio button plugin property: "instanceType" with value: "public"
39+
Then Replace input plugin property: "connectionName" with value: "connectionName" for Credentials and Authorization related fields
40+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
41+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
42+
Then Enter key value pairs for plugin property: "connectionArguments" with values from json: "connectionArgumentsList"
43+
Then Enter input plugin property: "referenceName" with value: "RefName"
44+
Then Enter input plugin property: "database" with value: "TestDatabase"
45+
Then Enter input plugin property: "tableName" with value: "mytable"
46+
Then Validate "CloudSQL MySQL" plugin properties
47+
Then Close the Plugin Properties page
48+
49+
Scenario: To verify CloudMySql source plugin validation setting up connection arguments
50+
Given Open Datafusion Project to configure pipeline
51+
When Expand Plugin group in the LHS plugins list: "Sink"
52+
When Select plugin: "CloudSQL MySQL" from the plugins list as: "Sink"
53+
Then Navigate to the properties page of plugin: "CloudSQL MySQL"
54+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
55+
Then Select radio button plugin property: "instanceType" with value: "public"
56+
Then Replace input plugin property: "connectionName" with value: "connectionName" for Credentials and Authorization related fields
57+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
58+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
59+
Then Enter key value pairs for plugin property: "connectionArguments" with values from json: "connectionArgumentsList"
60+
Then Enter input plugin property: "referenceName" with value: "referencename"
61+
Then Enter input plugin property: "database" with value: "DatabaseName"
62+
Then Enter textarea plugin property: "importQuery" with value: "insertQuery"
63+
Then Click on the Get Schema button
64+
Then Validate "CloudSQL MySQL" plugin properties
65+
Then Close the Plugin Properties page
66+
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
# 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..
14+
15+
@CloudMySql @CloudMySql_Required
16+
Feature: CloudMySql sink- Verify CloudsqlMysql sink plugin design time validation scenarios
17+
18+
Scenario: To verify CloudMySql sink plugin validation error message with invalid database
19+
Given Open Datafusion Project to configure pipeline
20+
When Expand Plugin group in the LHS plugins list: "Source"
21+
When Select plugin: "CloudSQL MySQL" from the plugins list as: "Source"
22+
When Expand Plugin group in the LHS plugins list: "Sink"
23+
When Select plugin: "CloudSQL MySQL" from the plugins list as: "Sink"
24+
Then Connect plugins: "CloudSQL MySQL" and "CloudSQL MySQL2" to establish connection
25+
Then Navigate to the properties page of plugin: "CloudSQL MySQL"
26+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
27+
Then Select radio button plugin property: "instanceType" with value: "public"
28+
Then Replace input plugin property: "connectionName" with value: "connectionName" for Credentials and Authorization related fields
29+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
30+
Then Replace 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 Enter input plugin property: "database" with value: "TestDatabase"
33+
Then Enter textarea plugin property: "importQuery" with value: "insertQuery"
34+
Then Click on the Get Schema button
35+
Then Verify the Output Schema matches the Expected Schema: "outputSchema"
36+
Then Validate "CloudSQL MySQL" plugin properties
37+
Then Close the Plugin Properties page
38+
Then Navigate to the properties page of plugin: "CloudSQL MySQL2"
39+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
40+
Then Select radio button plugin property: "instanceType" with value: "public"
41+
Then Enter 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 Enter input plugin property: "database" with value: "invalidDatabaseName"
46+
Then Enter input plugin property: "tableName" with value: "mytable"
47+
Then Click on the Validate button
48+
Then Verify that the Plugin is displaying an error message: "errorMessageInvalidSinkDatabase" on the header
49+
50+
Scenario: To verify CloudMySql sink plugin validation error message with invalid tablename
51+
Given Open Datafusion Project to configure pipeline
52+
When Expand Plugin group in the LHS plugins list: "Source"
53+
When Select plugin: "CloudSQL MySQL" from the plugins list as: "Source"
54+
When Expand Plugin group in the LHS plugins list: "Sink"
55+
When Select plugin: "CloudSQL MySQL" from the plugins list as: "Sink"
56+
Then Connect plugins: "CloudSQL MySQL" and "CloudSQL MySQL2" to establish connection
57+
Then Navigate to the properties page of plugin: "CloudSQL MySQL"
58+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
59+
Then Select radio button plugin property: "instanceType" with value: "public"
60+
Then Replace input plugin property: "connectionName" with value: "connectionName" for Credentials and Authorization related fields
61+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
62+
Then Replace 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 Enter input plugin property: "database" with value: "TestDatabase"
65+
Then Enter textarea plugin property: "importQuery" with value: "insertQuery"
66+
Then Click on the Get Schema button
67+
Then Verify the Output Schema matches the Expected Schema: "outputSchema"
68+
Then Validate "CloudSQL MySQL" plugin properties
69+
Then Close the Plugin Properties page
70+
Then Navigate to the properties page of plugin: "CloudSQL MySQL2"
71+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
72+
Then Select radio button plugin property: "instanceType" with value: "public"
73+
Then Replace input plugin property: "connectionName" with value: "connectionName" for Credentials and Authorization related fields
74+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
75+
Then Enter input plugin property: "referenceName" with value: "invalidRefName"
76+
Then Enter input plugin property: "database" with value: "TestDatabase"
77+
Then Enter input plugin property: "tableName" with value: "Invalidtable"
78+
Then Click on the Validate button
79+
Then Verify that the Plugin Property: "table" is displaying an in-line error message: "errorMessageInvalidTableName"
80+
81+
Scenario: To verify CloudMySql sink plugin validation error message with invalid reference Name
82+
Given Open Datafusion Project to configure pipeline
83+
When Expand Plugin group in the LHS plugins list: "Sink"
84+
When Select plugin: "CloudSQL MySQL" from the plugins list as: "Sink"
85+
Then Navigate to the properties page of plugin: "CloudSQL MySQL"
86+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
87+
Then Select radio button plugin property: "instanceType" with value: "public"
88+
Then Replace input plugin property: "connectionName" with value: "connectionName" for Credentials and Authorization related fields
89+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
90+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
91+
Then Enter input plugin property: "referenceName" with value: "invalidRef"
92+
Then Enter key value pairs for plugin property: "connectionArguments" with values from json: "connectionArgumentsList"
93+
Then Enter input plugin property: "database" with value: "TestDatabase"
94+
Then Enter input plugin property: "tableName" with value: "mytable"
95+
Then Click on the Validate button
96+
Then Verify that the Plugin Property: "referenceName" is displaying an in-line error message: "errorMessageCloudMySqlInvalidReferenceName"
97+
98+
Scenario: To verify CloudMySql sink plugin validation error message with blank username
99+
Given Open Datafusion Project to configure pipeline
100+
When Expand Plugin group in the LHS plugins list: "Sink"
101+
When Select plugin: "CloudSQL MySQL" from the plugins list as: "Sink"
102+
Then Navigate to the properties page of plugin: "CloudSQL MySQL"
103+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
104+
Then Select radio button plugin property: "instanceType" with value: "public"
105+
Then Replace input plugin property: "connectionName" with value: "connectionName" for Credentials and Authorization related fields
106+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
107+
Then Enter key value pairs for plugin property: "connectionArguments" with values from json: "connectionArgumentsList"
108+
Then Enter input plugin property: "referenceName" with value: "RefName"
109+
Then Enter input plugin property: "database" with value: "TestDatabase"
110+
Then Enter input plugin property: "tableName" with value: "mytable"
111+
Then Click on the Validate button
112+
Then Verify that the Plugin Property: "user" is displaying an in-line error message: "errorMessageBlankUsername"
113+
114+
Scenario: To verify CloudMySql sink plugin validation error message with ConnectionName
115+
Given Open Datafusion Project to configure pipeline
116+
When Expand Plugin group in the LHS plugins list: "Sink"
117+
When Select plugin: "CloudSQL MySQL" from the plugins list as: "Sink"
118+
Then Navigate to the properties page of plugin: "CloudSQL MySQL"
119+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
120+
Then Select radio button plugin property: "instanceType" with value: "public"
121+
Then Enter input plugin property: "connectionName" with value: "cdf-athena:us-central1"
122+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
123+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
124+
Then Enter key value pairs for plugin property: "connectionArguments" with values from json: "connectionArgumentsList"
125+
Then Enter input plugin property: "referenceName" with value: "RefName"
126+
Then Enter input plugin property: "database" with value: "TestDatabase"
127+
Then Enter input plugin property: "tableName" with value: "mytable"
128+
Then Click on the Validate button
129+
Then Verify that the Plugin Property: "connectionName" is displaying an in-line error message: "errorMessageConnectionName"
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# 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..
14+
15+
@CloudMySql @CloudMySql_Required
16+
Feature: CloudMySql sink- Verify CloudMySql sink plugin design time macro scenarios
17+
18+
Scenario: To verify CloudMySql sink plugin validation with macro enabled fields for connection section
19+
Given Open Datafusion Project to configure pipeline
20+
When Expand Plugin group in the LHS plugins list: "Sink"
21+
When Select plugin: "CloudSQL MySQL" from the plugins list as: "Sink"
22+
Then Navigate to the properties page of plugin: "CloudSQL MySQL"
23+
Then Click on the Macro button of Property: "jdbcPluginName" and set the value to: "driverName"
24+
Then Replace input plugin property: "connectionName" with value: "connectionName" for Credentials and Authorization related fields
25+
Then Select radio button plugin property: "instanceType" with value: "public"
26+
Then Click on the Macro button of Property: "user" and set the value to: "username"
27+
Then Click on the Macro button of Property: "password" and set the value to: "password"
28+
Then Click on the Macro button of Property: "connectionArguments" and set the value to: "connectionArgumentsList"
29+
Then Enter input plugin property: "referenceName" with value: "sourceRef"
30+
Then Replace input plugin property: "database" with value: "TestDatabase"
31+
Then Click on the Validate button
32+
Then Validate "CloudSQL MySQL" plugin properties
33+
Then Close the Plugin Properties page
34+
35+
Scenario: To verify cloudsql sink plugin validation with macro enabled fields for basic section
36+
Given Open Datafusion Project to configure pipeline
37+
When Expand Plugin group in the LHS plugins list: "Sink"
38+
When Select plugin: "CloudSQL MySQL" from the plugins list as: "Sink"
39+
Then Navigate to the properties page of plugin: "CloudSQL MySQL"
40+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
41+
Then Replace input plugin property: "connectionName" with value: "connectionName" for Credentials and Authorization related fields
42+
Then Select radio button plugin property: "instanceType" with value: "public"
43+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
44+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
45+
Then Enter input plugin property: "referenceName" with value: "sourceRef"
46+
Then Replace input plugin property: "database" with value: "TestDatabase"
47+
Then Click on the Macro button of Property: "tableName" and set the value to: "mytable"
48+
Then Click on the Validate button
49+
Then Validate "CloudSQL MySQL" plugin properties
50+
Then Close the Plugin Properties page

0 commit comments

Comments
 (0)