Skip to content

Commit a8d268e

Browse files
committed
e2e oracle sink update upsert tests
1 parent 35b567d commit a8d268e

File tree

7 files changed

+365
-7
lines changed

7 files changed

+365
-7
lines changed

oracle-plugin/src/e2e-test/features/sink/OracleDesignTimeValidation.feature

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,3 +262,51 @@ Feature: Oracle sink- Verify Oracle sink plugin design time validation scenarios
262262
Then Click on the Validate button
263263
Then Verify that the Plugin is displaying an error message: "blank.HostBlank.message" on the header
264264

265+
@ORACLE_SOURCE_DATATYPES_TEST @ORACLE_TARGET_DATATYPES_TEST @Oracle_Required
266+
Scenario Outline: To verify Oracle sink plugin validation error message for update, upsert operation name and table key
267+
Given Open Datafusion Project to configure pipeline
268+
When Expand Plugin group in the LHS plugins list: "Source"
269+
When Select plugin: "Oracle" from the plugins list as: "Source"
270+
When Expand Plugin group in the LHS plugins list: "Sink"
271+
When Select plugin: "Oracle" from the plugins list as: "Sink"
272+
Then Connect plugins: "Oracle" and "Oracle2" to establish connection
273+
Then Navigate to the properties page of plugin: "Oracle"
274+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
275+
Then Replace input plugin property: "host" with value: "host" for Credentials and Authorization related fields
276+
Then Replace input plugin property: "port" with value: "port" for Credentials and Authorization related fields
277+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
278+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
279+
Then Select radio button plugin property: "connectionType" with value: "service"
280+
Then Select radio button plugin property: "role" with value: "normal"
281+
Then Enter input plugin property: "referenceName" with value: "sourceRef"
282+
Then Replace input plugin property: "database" with value: "databaseName"
283+
Then Enter textarea plugin property: "importQuery" with value: "selectQuery"
284+
Then Click on the Get Schema button
285+
Then Verify the Output Schema matches the Expected Schema: "outputDatatypesSchema"
286+
Then Validate "Oracle" plugin properties
287+
Then Close the Plugin Properties page
288+
Then Navigate to the properties page of plugin: "Oracle2"
289+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
290+
Then Replace input plugin property: "host" with value: "host" for Credentials and Authorization related fields
291+
Then Replace input plugin property: "port" with value: "port" for Credentials and Authorization related fields
292+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
293+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
294+
Then Select radio button plugin property: "connectionType" with value: "service"
295+
Then Select radio button plugin property: "role" with value: "normal"
296+
Then Enter input plugin property: "referenceName" with value: "sourceRef"
297+
Then Replace input plugin property: "database" with value: "databaseName"
298+
Then Replace input plugin property: "tableName" with value: "targetTable"
299+
Then Replace input plugin property: "dbSchemaName" with value: "schema"
300+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
301+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
302+
Then Enter input plugin property: "referenceName" with value: "targetRef"
303+
Then Select radio button plugin property: "connectionType" with value: "service"
304+
Then Select radio button plugin property: "role" with value: "normal"
305+
Then Select radio button plugin property: "operationName" with value: "<options>"
306+
Then Click on the Validate button
307+
Then Verify that the Plugin Property: "operationName" is displaying an in-line error message: "errorMessageUpdateUpsertOperationName"
308+
Then Verify that the Plugin Property: "relationTableKey" is displaying an in-line error message: "errorMessageUpdateUpsertOperationName"
309+
Examples:
310+
| options |
311+
| upsert |
312+
| update |

oracle-plugin/src/e2e-test/features/sink/OracleRunTime.feature

Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,3 +272,175 @@ Feature: Oracle - Verify data transfer from BigQuery source to Oracle sink
272272
Then Verify the pipeline status is "Succeeded"
273273
Then Validate records transferred to target table with record counts of BigQuery table
274274
Then Validate the values of records transferred to target Oracle table is equal to the values from source BigQuery table
275+
276+
@ORACLE_SOURCE_DATATYPES_TEST @ORACLE_TARGET_DATATYPES_TEST @Oracle_Required
277+
Scenario Outline: To verify pipeline preview failed with invalid table key
278+
Given Open Datafusion Project to configure pipeline
279+
When Expand Plugin group in the LHS plugins list: "Source"
280+
When Select plugin: "Oracle" from the plugins list as: "Source"
281+
When Expand Plugin group in the LHS plugins list: "Sink"
282+
When Select plugin: "Oracle" from the plugins list as: "Sink"
283+
Then Connect plugins: "Oracle" and "Oracle2" to establish connection
284+
Then Navigate to the properties page of plugin: "Oracle"
285+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
286+
Then Replace input plugin property: "host" with value: "host" for Credentials and Authorization related fields
287+
Then Replace input plugin property: "port" with value: "port" for Credentials and Authorization related fields
288+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
289+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
290+
Then Select radio button plugin property: "connectionType" with value: "service"
291+
Then Select radio button plugin property: "role" with value: "normal"
292+
Then Enter input plugin property: "referenceName" with value: "sourceRef"
293+
Then Replace input plugin property: "database" with value: "databaseName"
294+
Then Enter textarea plugin property: "importQuery" with value: "selectQuery"
295+
Then Click on the Get Schema button
296+
Then Verify the Output Schema matches the Expected Schema: "outputDatatypesSchema"
297+
Then Validate "Oracle" plugin properties
298+
Then Close the Plugin Properties page
299+
Then Navigate to the properties page of plugin: "Oracle2"
300+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
301+
Then Replace input plugin property: "host" with value: "host" for Credentials and Authorization related fields
302+
Then Replace input plugin property: "port" with value: "port" for Credentials and Authorization related fields
303+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
304+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
305+
Then Select radio button plugin property: "connectionType" with value: "service"
306+
Then Select radio button plugin property: "role" with value: "normal"
307+
Then Enter input plugin property: "referenceName" with value: "sourceRef"
308+
Then Replace input plugin property: "database" with value: "databaseName"
309+
Then Replace input plugin property: "tableName" with value: "targetTable"
310+
Then Replace input plugin property: "dbSchemaName" with value: "schema"
311+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
312+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
313+
Then Enter input plugin property: "referenceName" with value: "targetRef"
314+
Then Select radio button plugin property: "connectionType" with value: "service"
315+
Then Select radio button plugin property: "role" with value: "normal"
316+
Then Select radio button plugin property: "operationName" with value: "<options>"
317+
Then Click on the Add Button of the property: "relationTableKey" with value:
318+
| invalidOracleTableKey |
319+
Then Close the Plugin Properties page
320+
Then Save the pipeline
321+
Then Preview and run the pipeline
322+
Then Verify the preview of pipeline is "Failed"
323+
Examples:
324+
| options |
325+
| upsert |
326+
| update |
327+
328+
@ORACLE_SOURCE_TEST @ORACLE_UPDATE_TABLE @Oracle_Required
329+
Scenario Outline: To verify data is getting transferred from Oracle to Oracle successfully using update operation with table key
330+
Given Open Datafusion Project to configure pipeline
331+
When Expand Plugin group in the LHS plugins list: "Source"
332+
When Select plugin: "Oracle" from the plugins list as: "Source"
333+
When Expand Plugin group in the LHS plugins list: "Sink"
334+
When Select plugin: "Oracle" from the plugins list as: "Sink"
335+
Then Connect plugins: "Oracle" and "Oracle2" to establish connection
336+
Then Navigate to the properties page of plugin: "Oracle"
337+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
338+
Then Replace input plugin property: "host" with value: "host" for Credentials and Authorization related fields
339+
Then Replace input plugin property: "port" with value: "port" for Credentials and Authorization related fields
340+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
341+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
342+
Then Select radio button plugin property: "connectionType" with value: "service"
343+
Then Select radio button plugin property: "role" with value: "normal"
344+
Then Enter input plugin property: "referenceName" with value: "sourceRef"
345+
Then Replace input plugin property: "database" with value: "databaseName"
346+
Then Enter textarea plugin property: "importQuery" with value: "selectQuery"
347+
Then Click on the Get Schema button
348+
Then Verify the Output Schema matches the Expected Schema: "outputSchema"
349+
Then Validate "Oracle" plugin properties
350+
Then Close the Plugin Properties page
351+
Then Navigate to the properties page of plugin: "Oracle2"
352+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
353+
Then Replace input plugin property: "host" with value: "host" for Credentials and Authorization related fields
354+
Then Replace input plugin property: "port" with value: "port" for Credentials and Authorization related fields
355+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
356+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
357+
Then Select radio button plugin property: "connectionType" with value: "service"
358+
Then Select radio button plugin property: "role" with value: "normal"
359+
Then Enter input plugin property: "referenceName" with value: "sourceRef"
360+
Then Replace input plugin property: "database" with value: "databaseName"
361+
Then Replace input plugin property: "tableName" with value: "targetTable"
362+
Then Replace input plugin property: "dbSchemaName" with value: "schema"
363+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
364+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
365+
Then Enter input plugin property: "referenceName" with value: "targetRef"
366+
Then Select radio button plugin property: "connectionType" with value: "service"
367+
Then Select radio button plugin property: "role" with value: "normal"
368+
Then Select radio button plugin property: "operationName" with value: "<options>"
369+
Then Click on the Add Button of the property: "relationTableKey" with value:
370+
| oracleTableKey |
371+
Then Validate "Oracle" plugin properties
372+
Then Close the Plugin Properties page
373+
Then Save the pipeline
374+
Then Preview and run the pipeline
375+
Then Verify the preview of pipeline is "success"
376+
Then Click on the Preview Data link on the Sink plugin node: "Oracle"
377+
Then Close the preview data
378+
Then Deploy the pipeline
379+
Then Run the Pipeline in Runtime
380+
Then Wait till pipeline is in running state
381+
Then Open and capture logs
382+
Then Verify the pipeline status is "Succeeded"
383+
Then Validate the values of records transferred to target table is equal to the values from source table
384+
Examples:
385+
| options |
386+
| update |
387+
388+
@ORACLE_SOURCE_TEST @ORACLE_UPSERT_TABLE @Oracle_Required
389+
Scenario Outline: To verify data is getting transferred from Oracle to Oracle successfully using upsert operation with table key
390+
Given Open Datafusion Project to configure pipeline
391+
When Expand Plugin group in the LHS plugins list: "Source"
392+
When Select plugin: "Oracle" from the plugins list as: "Source"
393+
When Expand Plugin group in the LHS plugins list: "Sink"
394+
When Select plugin: "Oracle" from the plugins list as: "Sink"
395+
Then Connect plugins: "Oracle" and "Oracle2" to establish connection
396+
Then Navigate to the properties page of plugin: "Oracle"
397+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
398+
Then Replace input plugin property: "host" with value: "host" for Credentials and Authorization related fields
399+
Then Replace input plugin property: "port" with value: "port" for Credentials and Authorization related fields
400+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
401+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
402+
Then Select radio button plugin property: "connectionType" with value: "service"
403+
Then Select radio button plugin property: "role" with value: "normal"
404+
Then Enter input plugin property: "referenceName" with value: "sourceRef"
405+
Then Replace input plugin property: "database" with value: "databaseName"
406+
Then Enter textarea plugin property: "importQuery" with value: "selectQuery"
407+
Then Click on the Get Schema button
408+
Then Verify the Output Schema matches the Expected Schema: "outputSchema"
409+
Then Validate "Oracle" plugin properties
410+
Then Close the Plugin Properties page
411+
Then Navigate to the properties page of plugin: "Oracle2"
412+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
413+
Then Replace input plugin property: "host" with value: "host" for Credentials and Authorization related fields
414+
Then Replace input plugin property: "port" with value: "port" for Credentials and Authorization related fields
415+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
416+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
417+
Then Select radio button plugin property: "connectionType" with value: "service"
418+
Then Select radio button plugin property: "role" with value: "normal"
419+
Then Enter input plugin property: "referenceName" with value: "sourceRef"
420+
Then Replace input plugin property: "database" with value: "databaseName"
421+
Then Replace input plugin property: "tableName" with value: "targetTable"
422+
Then Replace input plugin property: "dbSchemaName" with value: "schema"
423+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
424+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
425+
Then Enter input plugin property: "referenceName" with value: "targetRef"
426+
Then Select radio button plugin property: "connectionType" with value: "service"
427+
Then Select radio button plugin property: "role" with value: "normal"
428+
Then Select radio button plugin property: "operationName" with value: "<options>"
429+
Then Click on the Add Button of the property: "relationTableKey" with value:
430+
| oracleTableKey |
431+
Then Validate "Oracle" plugin properties
432+
Then Close the Plugin Properties page
433+
Then Save the pipeline
434+
Then Preview and run the pipeline
435+
Then Verify the preview of pipeline is "success"
436+
Then Click on the Preview Data link on the Sink plugin node: "Oracle"
437+
Then Close the preview data
438+
Then Deploy the pipeline
439+
Then Run the Pipeline in Runtime
440+
Then Wait till pipeline is in running state
441+
Then Open and capture logs
442+
Then Verify the pipeline status is "Succeeded"
443+
Then Validate the values of records transferred to target table is equal to the values from source table
444+
Examples:
445+
| options |
446+
| upsert |

0 commit comments

Comments
 (0)