Skip to content

Commit cb5e3ee

Browse files
authored
Merge pull request #408 from cloudsufi/cloudSQL-mySQL-e2e
cloudSql-mySql e2e
2 parents 001496a + 9b8c049 commit cb5e3ee

27 files changed

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

0 commit comments

Comments
 (0)