Skip to content

Commit

Permalink
e2e_oracle replication tests (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmekumari authored Sep 5, 2023
1 parent b3aca06 commit 636d70f
Show file tree
Hide file tree
Showing 14 changed files with 411 additions and 266 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,21 +75,21 @@ jobs:
uses: 'google-github-actions/get-secretmanager-secrets@v0'
with:
secrets: |-
ORACLE_HOST:cdapio-github-builds/ORACLE_HOST
ORACLE_USERNAME:cdapio-github-builds/ORACLE_NORMAL_USERNAME
ORACLE_PASSWORD:cdapio-github-builds/ORACLE_NORMAL_PASSWORD
ORACLE_REPLICATION_HOST:cdapio-github-builds/ORACLE_REPLICATION_HOST
ORACLE_REPLICATION_USERNAME:cdapio-github-builds/ORACLE_REPLICATION_USERNAME
ORACLE_REPLICATION_PASSWORD:cdapio-github-builds/ORACLE_REPLICATION_PASSWORD
ORACLE_PORT:cdapio-github-builds/ORACLE_PORT
PROJECT_ID:cdapio-github-builds/PROJECT_ID
ORACLE_PROJECT_ID:cdapio-github-builds/ORACLE_PROJECT_ID
- name: Run all e2e tests
if: github.event_name == 'workflow_dispatch' || github.event_name == 'push' || steps.filter.outputs.e2e-test == 'true'
run: python3 e2e/src/main/scripts/run_e2e_test.py --testRunner TestRunner.java
env:
ORACLE_HOST: ${{ steps.secrets.outputs.ORACLE_HOST }}
ORACLE_USERNAME: ${{ steps.secrets.outputs.ORACLE_USERNAME }}
ORACLE_PASSWORD: ${{ steps.secrets.outputs.ORACLE_PASSWORD }}
ORACLE_REPLICATION_HOST: ${{ steps.secrets.outputs.ORACLE_REPLICATION_HOST }}
ORACLE_REPLICATION_USERNAME: ${{ steps.secrets.outputs.ORACLE_REPLICATION_USERNAME }}
ORACLE_REPLICATION_PASSWORD: ${{ steps.secrets.outputs.ORACLE_REPLICATION_PASSWORD }}
ORACLE_PORT: ${{ steps.secrets.outputs.ORACLE_PORT }}
PROJECT_ID : ${{ steps.secrets.outputs.PROJECT_ID }}
ORACLE_PROJECT_ID : ${{ steps.secrets.outputs.ORACLE_PROJECT_ID }}

- name: Upload report
uses: actions/upload-artifact@v3
Expand Down
200 changes: 200 additions & 0 deletions src/e2e-test/features/DesignTimeValidation.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
#
# Copyright © 2023 Cask Data, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
#

@Oracle
Feature: Oracle - Verify Oracle source plugin design time validation scenarios

@REQUIRED
Scenario: To verify validation message when user provides invalid Host
Given Open DataFusion Project with replication to configure replication job
When Enter input plugin property: "name" with pipelineName
And Click on the "Next" button in replication to navigate
And Select Source plugin: "Oracle" from the replication plugins list
Then Select radio button plugin property: "connectivityMethod" with value: "private-connectivity"
Then Enter input plugin property: "privateConnectionName" with value: "privateConnectionName"
Then Replace input plugin property: "host" with value: "oracleInvalidHost" for Credentials and Authorization related fields
Then Replace input plugin property: "port" with value: "oraclePort" for Credentials and Authorization related fields
Then Replace input plugin property: "sid" with value: "oracleDatabaseName"
Then Replace input plugin property: "user" with value: "oracleUsername" for Credentials and Authorization related fields
Then Replace input plugin property: "password" with value: "oraclePassword" for Credentials and Authorization related fields
And Click on the "Next" button in replication to navigate
Then Enter input plugin property: "datasetName" with value: "dataset"
Then Replace input plugin property: "project" with value: "projectId"
And Click on the "Next" button in replication to navigate
Then Verify that the Plugin is displaying an error message: "errorMessageInvalidHost"

Scenario: To verify validation message when user provides invalid Port
Given Open DataFusion Project with replication to configure replication job
When Enter input plugin property: "name" with pipelineName
And Click on the "Next" button in replication to navigate
And Select Source plugin: "Oracle" from the replication plugins list
Then Select radio button plugin property: "connectivityMethod" with value: "private-connectivity"
Then Enter input plugin property: "privateConnectionName" with value: "privateConnectionName"
Then Replace input plugin property: "host" with value: "oracleHost" for Credentials and Authorization related fields
Then Replace input plugin property: "port" with value: "oracleInvalidPort" for Credentials and Authorization related fields
Then Replace input plugin property: "sid" with value: "oracleDatabaseName"
Then Replace input plugin property: "user" with value: "oracleUsername" for Credentials and Authorization related fields
Then Replace input plugin property: "password" with value: "oraclePassword" for Credentials and Authorization related fields
And Click on the "Next" button in replication to navigate
Then Enter input plugin property: "datasetName" with value: "dataset"
Then Replace input plugin property: "project" with value: "projectId"
And Click on the "Next" button in replication to navigate
Then Verify that the Plugin is displaying an error message: "errorMessageInvalidPort"

@REQUIRED
Scenario: To verify validation message when user provides invalid Database Name
Given Open DataFusion Project with replication to configure replication job
When Enter input plugin property: "name" with pipelineName
And Click on the "Next" button in replication to navigate
And Select Source plugin: "Oracle" from the replication plugins list
Then Select radio button plugin property: "connectivityMethod" with value: "private-connectivity"
Then Enter input plugin property: "privateConnectionName" with value: "privateConnectionName"
Then Replace input plugin property: "host" with value: "oracleHost" for Credentials and Authorization related fields
Then Replace input plugin property: "port" with value: "oraclePort" for Credentials and Authorization related fields
Then Replace input plugin property: "sid" with value: "oracleInvalidDatabaseName"
Then Replace input plugin property: "user" with value: "oracleUsername" for Credentials and Authorization related fields
Then Replace input plugin property: "password" with value: "oraclePassword" for Credentials and Authorization related fields
And Click on the "Next" button in replication to navigate
Then Enter input plugin property: "datasetName" with value: "dataset"
Then Replace input plugin property: "project" with value: "projectId"
And Click on the "Next" button in replication to navigate
Then Verify that the Plugin is displaying an error message: "errorMessageInvalidDatabase"

@REQUIRED
Scenario: To verify validation message when user provides invalid user
Given Open DataFusion Project with replication to configure replication job
When Enter input plugin property: "name" with pipelineName
And Click on the "Next" button in replication to navigate
And Select Source plugin: "Oracle" from the replication plugins list
Then Select radio button plugin property: "connectivityMethod" with value: "private-connectivity"
Then Enter input plugin property: "privateConnectionName" with value: "privateConnectionName"
Then Replace input plugin property: "host" with value: "oracleHost" for Credentials and Authorization related fields
Then Replace input plugin property: "port" with value: "oraclePort" for Credentials and Authorization related fields
Then Replace input plugin property: "sid" with value: "oracleDatabaseName"
Then Replace input plugin property: "user" with value: "oracleInvalidUser" for Credentials and Authorization related fields
Then Replace input plugin property: "password" with value: "oraclePassword" for Credentials and Authorization related fields
And Click on the "Next" button in replication to navigate
Then Enter input plugin property: "datasetName" with value: "dataset"
Then Replace input plugin property: "project" with value: "projectId"
And Click on the "Next" button in replication to navigate
Then Verify that the Plugin is displaying an error message: "errorMessageInvalidUser"

Scenario: To verify validation message when user provides invalid password
Given Open DataFusion Project with replication to configure replication job
When Enter input plugin property: "name" with pipelineName
And Click on the "Next" button in replication to navigate
And Select Source plugin: "Oracle" from the replication plugins list
Then Select radio button plugin property: "connectivityMethod" with value: "private-connectivity"
Then Enter input plugin property: "privateConnectionName" with value: "privateConnectionName"
Then Replace input plugin property: "host" with value: "oracleHost" for Credentials and Authorization related fields
Then Replace input plugin property: "port" with value: "oraclePort" for Credentials and Authorization related fields
Then Replace input plugin property: "sid" with value: "oracleDatabaseName"
Then Replace input plugin property: "user" with value: "oracleInvalidUser" for Credentials and Authorization related fields
Then Replace input plugin property: "password" with value: "oracleInvalidPassword" for Credentials and Authorization related fields
And Click on the "Next" button in replication to navigate
Then Enter input plugin property: "datasetName" with value: "dataset"
Then Replace input plugin property: "project" with value: "projectId"
And Click on the "Next" button in replication to navigate
Then Verify that the Plugin is displaying an error message: "errorMessageInvalidPassword"

Scenario: To verify validation message when macro enabled for password field
Given Open DataFusion Project with replication to configure replication job
When Enter input plugin property: "name" with pipelineName
And Click on the "Next" button in replication to navigate
And Select Source plugin: "Oracle" from the replication plugins list
Then Select radio button plugin property: "connectivityMethod" with value: "private-connectivity"
Then Enter input plugin property: "privateConnectionName" with value: "privateConnectionName"
Then Replace input plugin property: "host" with value: "oracleHost" for Credentials and Authorization related fields
Then Replace input plugin property: "port" with value: "oraclePort" for Credentials and Authorization related fields
Then Replace input plugin property: "sid" with value: "oracleDatabaseName"
Then Replace input plugin property: "user" with value: "oracleUsername" for Credentials and Authorization related fields
Then Click on the Macro button of Property: "password" and set the value to: "oraclePassword"
And Click on the "Next" button in replication to navigate
Then Enter input plugin property: "datasetName" with value: "dataset"
Then Replace input plugin property: "project" with value: "projectId"
And Click on the "Next" button in replication to navigate
Then Verify that the Plugin is displaying an error message: "errorMessageMacroPassword"

Scenario: To verify validation message when macro enabled for service account key field
Given Open DataFusion Project with replication to configure replication job
When Enter input plugin property: "name" with pipelineName
And Click on the "Next" button in replication to navigate
And Select Source plugin: "Oracle" from the replication plugins list
Then Select radio button plugin property: "connectivityMethod" with value: "private-connectivity"
Then Enter input plugin property: "privateConnectionName" with value: "privateConnectionName"
Then Replace input plugin property: "host" with value: "oracleHost" for Credentials and Authorization related fields
Then Replace input plugin property: "port" with value: "oraclePort" for Credentials and Authorization related fields
Then Replace input plugin property: "sid" with value: "oracleDatabaseName"
Then Replace input plugin property: "user" with value: "oracleUsername" for Credentials and Authorization related fields
Then Replace input plugin property: "password" with value: "oraclePassword" for Credentials and Authorization related fields
And Click on the "Next" button in replication to navigate
Then Enter input plugin property: "datasetName" with value: "dataset"
Then Replace input plugin property: "project" with value: "projectId"
Then Click on the Macro button of Property: "serviceAccountKey" and set the value to: "ServiceAccountKey"
And Click on the "Next" button in replication to navigate
Then Verify that the Plugin is displaying an error message: "errorMessageMacroServiceAccountKey"

@REQUIRED
Scenario: To verify validation message when user provides blank password
Given Open DataFusion Project with replication to configure replication job
When Enter input plugin property: "name" with pipelineName
And Click on the "Next" button in replication to navigate
And Select Source plugin: "Oracle" from the replication plugins list
Then Select radio button plugin property: "connectivityMethod" with value: "private-connectivity"
Then Enter input plugin property: "privateConnectionName" with value: "privateConnectionName"
Then Replace input plugin property: "host" with value: "oracleHost" for Credentials and Authorization related fields
Then Replace input plugin property: "port" with value: "oraclePort" for Credentials and Authorization related fields
Then Replace input plugin property: "sid" with value: "oracleDatabaseName"
Then Replace input plugin property: "user" with value: "oracleUsername" for Credentials and Authorization related fields
And Click on the "Next" button in replication to navigate
Then Enter input plugin property: "datasetName" with value: "dataset"
Then Replace input plugin property: "project" with value: "projectId"
And Click on the "Next" button in replication to navigate
Then Verify that the Plugin is displaying an error message: "errorMessageBlankPassword"

Scenario: To verify validation message when user provides blank username
Given Open DataFusion Project with replication to configure replication job
When Enter input plugin property: "name" with pipelineName
And Click on the "Next" button in replication to navigate
And Select Source plugin: "Oracle" from the replication plugins list
Then Select radio button plugin property: "connectivityMethod" with value: "private-connectivity"
Then Enter input plugin property: "privateConnectionName" with value: "privateConnectionName"
Then Replace input plugin property: "host" with value: "oracleHost" for Credentials and Authorization related fields
Then Replace input plugin property: "port" with value: "oraclePort" for Credentials and Authorization related fields
Then Replace input plugin property: "sid" with value: "oracleDatabaseName"
Then Replace input plugin property: "password" with value: "oraclePassword" for Credentials and Authorization related fields
And Click on the "Next" button in replication to navigate
Then Enter input plugin property: "datasetName" with value: "dataset"
Then Replace input plugin property: "project" with value: "projectId"
And Click on the "Next" button in replication to navigate
Then Verify that the Plugin is displaying an error message: "errorMessageBlankUserName"

Scenario: To verify validation message when user provides blank host
Given Open DataFusion Project with replication to configure replication job
When Enter input plugin property: "name" with pipelineName
And Click on the "Next" button in replication to navigate
And Select Source plugin: "Oracle" from the replication plugins list
Then Select radio button plugin property: "connectivityMethod" with value: "private-connectivity"
Then Enter input plugin property: "privateConnectionName" with value: "privateConnectionName"
Then Replace input plugin property: "port" with value: "oraclePort" for Credentials and Authorization related fields
Then Replace input plugin property: "sid" with value: "oracleDatabaseName"
Then Replace input plugin property: "user" with value: "oracleUsername" for Credentials and Authorization related fields
Then Replace input plugin property: "password" with value: "oraclePassword" for Credentials and Authorization related fields
And Click on the "Next" button in replication to navigate
Then Enter input plugin property: "datasetName" with value: "dataset"
Then Replace input plugin property: "project" with value: "projectId"
And Click on the "Next" button in replication to navigate
Then Verify that the Plugin is displaying an error message: "errorMessageBlankHost"
Loading

0 comments on commit 636d70f

Please sign in to comment.