Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/cloudSql-postgreSql' into cloudS…
Browse files Browse the repository at this point in the history
…ql-postgreSql

# Conflicts:
#	cloudsql-postgresql-plugin/src/e2e-test/feature/cloudsql-postgresql/sink/DesignTime.feature
#	cloudsql-postgresql-plugin/src/e2e-test/feature/cloudsql-postgresql/sink/DesignTimeWithMacros.feature
#	cloudsql-postgresql-plugin/src/e2e-test/feature/cloudsql-postgresql/sink/DesignTimeWithValidation.feature
#	cloudsql-postgresql-plugin/src/e2e-test/feature/cloudsql-postgresql/sink/RunTime.feature
#	cloudsql-postgresql-plugin/src/e2e-test/feature/cloudsql-postgresql/sink/RunTimeMacro.feature
#	cloudsql-postgresql-plugin/src/e2e-test/feature/cloudsql-postgresql/source/DesignTime.feature
#	cloudsql-postgresql-plugin/src/e2e-test/feature/cloudsql-postgresql/source/DesignTimeWithMacro.feature
#	cloudsql-postgresql-plugin/src/e2e-test/feature/cloudsql-postgresql/source/DesignTimeWithValidation.feature
#	cloudsql-postgresql-plugin/src/e2e-test/feature/cloudsql-postgresql/source/RunTime.feature
#	cloudsql-postgresql-plugin/src/e2e-test/feature/cloudsql-postgresql/source/RunTimeMacro.feature
#	cloudsql-postgresql-plugin/src/e2e-test/java/io/cdap/plugin/cloudsqlpostgresql/BQValidation.java
#	cloudsql-postgresql-plugin/src/e2e-test/java/io/cdap/plugin/cloudsqlpostgresql/CloudSqlPostgreSqlClient.java
#	cloudsql-postgresql-plugin/src/e2e-test/java/io/cdap/plugin/cloudsqlpostgresql/runners/sinkrunner/TestRunner.java
#	cloudsql-postgresql-plugin/src/e2e-test/java/io/cdap/plugin/cloudsqlpostgresql/runners/sourcerunner/TestRunner.java
#	cloudsql-postgresql-plugin/src/e2e-test/java/io/cdap/plugin/cloudsqlpostgresql/stepsdesign/CloudSqlPostgreSql.java
#	cloudsql-postgresql-plugin/src/e2e-test/java/io/cdap/plugin/common/stepsdesign/TestSetUpHooks.java
#	cloudsql-postgresql-plugin/src/e2e-test/resources/pluginParameters.properties
#	cloudsql-postgresql-plugin/src/e2e-test/resources/testdata/BigQuery/BigQueryInsertDataQuery.txt
  • Loading branch information
AnkitCLI committed Jun 5, 2023
2 parents f4fa249 + 2ae73ac commit 53cf01d
Show file tree
Hide file tree
Showing 19 changed files with 408 additions and 203 deletions.
6 changes: 6 additions & 0 deletions cloudsql-postgresql-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@
<version>42.3.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.8</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Feature: CloudSQL-PostgreSQL sink - Verify CloudSQL-PostgreSQL sink plugin desig
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"
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"
Expand All @@ -41,7 +41,7 @@ Feature: CloudSQL-PostgreSQL sink - Verify CloudSQL-PostgreSQL sink plugin desig
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"
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"
Expand All @@ -59,7 +59,7 @@ Feature: CloudSQL-PostgreSQL sink - Verify CloudSQL-PostgreSQL sink plugin desig
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"
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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Feature: CloudSQL-PostgreSQL sink- Verify CloudSQL-PostgreSQL sink plugin design
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"
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"
Expand All @@ -42,7 +42,7 @@ Feature: CloudSQL-PostgreSQL sink- Verify CloudSQL-PostgreSQL sink plugin design
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"
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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Feature: CloudSQL-PostgreSQL Sink - Verify CloudSQL-postgreSQL Sink Plugin Error
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"
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"
Expand Down Expand Up @@ -72,7 +72,7 @@ Feature: CloudSQL-PostgreSQL Sink - Verify CloudSQL-postgreSQL Sink Plugin Error
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"
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"
Expand All @@ -85,7 +85,7 @@ Feature: CloudSQL-PostgreSQL Sink - Verify CloudSQL-postgreSQL Sink Plugin Error
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"
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"
Expand All @@ -105,7 +105,7 @@ Feature: CloudSQL-PostgreSQL Sink - Verify CloudSQL-postgreSQL Sink Plugin Error
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"
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"
Expand All @@ -118,7 +118,7 @@ Feature: CloudSQL-PostgreSQL Sink - Verify CloudSQL-postgreSQL Sink Plugin Error
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"
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"
Expand All @@ -134,7 +134,7 @@ Feature: CloudSQL-PostgreSQL Sink - Verify CloudSQL-postgreSQL Sink Plugin Error
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"
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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
@Cloudsqlpostgresql_Sink @Cloudsqlpostgresql_Sink_Required
Feature: CloudSQL-PostgreSQL sink - Verify data transfer from BigQuery source to CloudSQL-PostgreSQL sink

@BQ_SOURCE_TEST @CLOUDSQLPOSTGRESQL_TEST_TABLE
@BQ_SOURCE_TEST @CLOUDSQLPOSTGRESQL_TEST_TABLE @PLUGIN-1526
Scenario: To verify data is getting transferred from BigQuery source to CloudSQLPostgreSQL sink successfully with supported datatypes
Given Open Datafusion Project to configure pipeline
When Expand Plugin group in the LHS plugins list: "Source"
Expand All @@ -38,7 +38,7 @@ Feature: CloudSQL-PostgreSQL sink - Verify data transfer from BigQuery source to
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"
Then Replace input plugin property: "connectionName" with value: "connectionName" for Credentials and Authorization related fields
Then Replace input plugin property: "database" with value: "databaseName"
Then Replace input plugin property: "tableName" with value: "targetTable"
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
Expand All @@ -57,9 +57,9 @@ Feature: CloudSQL-PostgreSQL sink - Verify data transfer from BigQuery source to
Then Wait till pipeline is in running state
Then Open and capture logs
Then Verify the pipeline status is "Succeeded"
# Then Validate the values of records transferred to target PostGreSQL table is equal to the values from source BigQuery table
Then Validate the values of records transferred to target CloudSQLPostGreSQL table is equal to the values from source BigQuery table

@BQ_SOURCE_TEST @CLOUDSQLPOSTGRESQL_TEST_TABLE
@BQ_SOURCE_TEST @CLOUDSQLPOSTGRESQL_TEST_TABLE @PLUGIN-1526
Scenario: To verify data is getting transferred from BigQuery source to CloudSQLPostgreSQL sink successfully when connection arguments are set
Given Open Datafusion Project to configure pipeline
When Expand Plugin group in the LHS plugins list: "Source"
Expand All @@ -80,7 +80,7 @@ Feature: CloudSQL-PostgreSQL sink - Verify data transfer from BigQuery source to
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"
Then Replace input plugin property: "connectionName" with value: "connectionName" for Credentials and Authorization related fields
Then Replace input plugin property: "database" with value: "databaseName"
Then Replace input plugin property: "tableName" with value: "targetTable"
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
Expand All @@ -100,9 +100,9 @@ Feature: CloudSQL-PostgreSQL sink - Verify data transfer from BigQuery source to
Then Wait till pipeline is in running state
Then Open and capture logs
Then Verify the pipeline status is "Succeeded"
# Then Validate the values of records transferred to target PostGreSQL table is equal to the values from source BigQuery table
Then Validate the values of records transferred to target CloudSQLPostGreSQL table is equal to the values from source BigQuery table

@BQ_SOURCE_TEST @CLOUDSQLPOSTGRESQL_TEST_TABLE
@BQ_SOURCE_TEST @CLOUDSQLPOSTGRESQL_TEST_TABLE @PLUGIN-1526
Scenario: To verify data is getting transferred from BigQuery source to CloudSQLPostgreSQL sink with Advanced property Connection timeout
Given Open Datafusion Project to configure pipeline
When Expand Plugin group in the LHS plugins list: "Source"
Expand All @@ -123,7 +123,7 @@ Feature: CloudSQL-PostgreSQL sink - Verify data transfer from BigQuery source to
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"
Then Replace input plugin property: "connectionName" with value: "connectionName" for Credentials and Authorization related fields
Then Replace input plugin property: "database" with value: "databaseName"
Then Replace input plugin property: "tableName" with value: "targetTable"
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
Expand All @@ -143,4 +143,4 @@ Feature: CloudSQL-PostgreSQL sink - Verify data transfer from BigQuery source to
Then Wait till pipeline is in running state
Then Open and capture logs
Then Verify the pipeline status is "Succeeded"
# Then Validate the values of records transferred to target PostGreSQL table is equal to the values from source BigQuery table
Then Validate the values of records transferred to target CloudSQLPostGreSQL table is equal to the values from source BigQuery table
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
@Cloudsqlpostgresql_Sink @Cloudsqlpostgresql_Sink_Required
Feature: CloudSQL-PostgreSQL sink - Verify data transfer to PostgreSQL sink with macro arguments

@BQ_SOURCE_TEST @CLOUDSQLPOSTGRESQL_TEST_TABLE
@BQ_SOURCE_TEST @CLOUDSQLPOSTGRESQL_TEST_TABLE @PLUGIN-1629 @PLUGIN-1526
Scenario: To verify data is getting transferred from BigQuery source to CloudSQLPostgreSQL sink using macro arguments in connection section
Given Open Datafusion Project to configure pipeline
When Expand Plugin group in the LHS plugins list: "Source"
Expand All @@ -36,7 +36,7 @@ Feature: CloudSQL-PostgreSQL sink - Verify data transfer to PostgreSQL sink with
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"
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: "cloudSQLPostgreSQLUsername"
Then Click on the Macro button of Property: "password" and set the value to: "cloudSQLPostgreSQLPassword"
Then Replace input plugin property: "database" with value: "databaseName"
Expand Down Expand Up @@ -74,9 +74,9 @@ Feature: CloudSQL-PostgreSQL sink - Verify data transfer to PostgreSQL sink with
Then Open and capture logs
Then Verify the pipeline status is "Succeeded"
Then Close the pipeline logs
# Then Validate the values of records transferred to target PostGreSQL table is equal to the values from source BigQuery table
Then Validate the values of records transferred to target CloudSQLPostGreSQL table is equal to the values from source BigQuery table

@BQ_SOURCE_TEST @CLOUDSQLPOSTGRESQL_TEST_TABLE
@BQ_SOURCE_TEST @CLOUDSQLPOSTGRESQL_TEST_TABLE @PLUGIN-1629 @PLUGIN-1526
Scenario: To verify data is getting transferred from BigQuery source to CloudSQLPostgreSQL sink using macro arguments in basic section
Given Open Datafusion Project to configure pipeline
When Expand Plugin group in the LHS plugins list: "Source"
Expand All @@ -95,7 +95,7 @@ Feature: CloudSQL-PostgreSQL sink - Verify data transfer to PostgreSQL sink with
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"
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"
Expand Down Expand Up @@ -131,4 +131,4 @@ Feature: CloudSQL-PostgreSQL sink - Verify data transfer to PostgreSQL sink with
Then Open and capture logs
Then Verify the pipeline status is "Succeeded"
Then Close the pipeline logs
# Then Validate the values of records transferred to target PostGreSQL table is equal to the values from source BigQuery table
Then Validate the values of records transferred to target CloudSQLPostGreSQL table is equal to the values from source BigQuery table
Loading

0 comments on commit 53cf01d

Please sign in to comment.