forked from cdapio/cdap
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9bd05f5
commit 2d84b39
Showing
19 changed files
with
676 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
# Copyright © 2021 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. | ||
|
||
# This workflow will build a Java project with Maven | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | ||
# Note: Any changes to this workflow would be used only after merging into develop | ||
name: Build e2e tests | ||
|
||
on: | ||
push: | ||
branches: [ develop ] | ||
pull_request: | ||
branches: [ develop] | ||
types: [opened, synchronize, reopened, labeled] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: self-hosted | ||
# We allow builds: | ||
# 1) When triggered manually | ||
# 2) When it's a merge into a branch | ||
# 3) For PRs that are labeled as build and | ||
# - It's a code change | ||
# - A build label was just added | ||
# A bit complex but prevents builds when other labels are manipulated | ||
if: > | ||
github.event_name == 'workflow_dispatch' | ||
|| github.event_name == 'push' | ||
|| (contains(github.event.pull_request.labels.*.name, 'build') | ||
&& (github.event.action != 'labeled' || github.event.label.name == 'build') | ||
) | ||
strategy: | ||
matrix: | ||
tests: [ cdap-e2e-tests ] | ||
fail-fast: false | ||
steps: | ||
# Pinned 1.0.0 version | ||
- uses: actions/checkout@v3 | ||
with: | ||
path: plugin | ||
|
||
- uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 | ||
# Pinned version 2.11.1 | ||
if: github.event_name != 'workflow_dispatch' && github.event_name != 'push' | ||
id: filter | ||
with: | ||
working-directory: plugin | ||
filters: | | ||
e2e-test: | ||
- '**/e2e-test/**' | ||
- name: Checkout e2e test repo | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: Vipinofficial11/cdap-e2e-tests | ||
path: e2e | ||
ref: addPluginUploadSkipFlag | ||
|
||
- name: Cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ github.workflow }}-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven-${{ github.workflow }} | ||
- name: Run required e2e tests | ||
if: github.event_name != 'workflow_dispatch' && github.event_name != 'push' && steps.filter.outputs.e2e-test == 'false' | ||
run: python3 e2e/src/main/scripts/run_cdap_e2e_test.py --testRunner TestRunnerRequired.java | ||
|
||
- 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_cdap_e2e_test.py --testRunner TestRunnerRequired.java | ||
|
||
- name: Upload report | ||
uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: Cucumber report - ${{ matrix.tests }} | ||
path: ./plugin/${{ matrix.tests }}/target/cucumber-reports | ||
|
||
- name: Upload debug files | ||
uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: Debug files - ${{ matrix.tests }} | ||
path: ./**/target/e2e-debug | ||
|
||
- name: Upload files to GCS | ||
uses: google-github-actions/upload-cloud-storage@v0 | ||
if: always() | ||
with: | ||
path: ./plugin/cdap-e2e-tests/target/cucumber-reports | ||
destination: e2e-tests-cucumber-reports/${{ github.event.repository.name }}/${{ github.ref }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,3 +55,5 @@ derby.log | |
|
||
# generated by docs build | ||
*.pyc | ||
|
||
#/cdap-ui |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
cdap-e2e-tests/src/e2e-test/features/systemadmin/SysAdminDesignTime.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# | ||
# 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. | ||
# | ||
|
||
@Sysadmin | ||
Feature: Sysadmin - Validate system admin page design time scenarios | ||
|
||
@Sysadmin1 | ||
Scenario:Validate user is able to create new system preferences and able to delete the added system preferences successfully | ||
Given Open Datafusion Project to configure pipeline | ||
When Open "System Admin" menu | ||
Then Click on the Configuration link on the System admin page | ||
Then Select "systemPreferences" option from Configuration page | ||
Then Click on edit system preferences | ||
Then Set system preferences with key: "keyValue" and value: "systemPreferences1" | ||
Then Click on the Save & Close preferences button | ||
Then Select "systemPreferences" option from Configuration page | ||
Then Click on edit system preferences | ||
Then Delete the preferences | ||
Then Click on the Save & Close preferences button | ||
Then Verify the system admin page is navigated successfully | ||
|
||
Scenario:Validate user is able to add multiple system preferences inside system admin successfully | ||
Given Open Datafusion Project to configure pipeline | ||
When Open "System Admin" menu | ||
Then Click on the Configuration link on the System admin page | ||
Then Select "systemPreferences" option from Configuration page | ||
Then Click on edit system preferences | ||
Then Set system preferences with key: "keyValue" and value: "systemPreferences2" | ||
Then Click on the Save & Close preferences button | ||
Then Click on edit system preferences | ||
Then Delete the preferences | ||
Then Delete the preferences | ||
Then Click on the Save & Close preferences button | ||
Then Verify the system admin page is navigated successfully | ||
|
||
Scenario:Validate user is able to successfully reload system artifacts using reload | ||
Given Open Datafusion Project to configure pipeline | ||
When Open "System Admin" menu | ||
Then Click on the Configuration link on the System admin page | ||
Then Click on Reload System Artifacts from the System admin page | ||
Then Click on Reload button on popup to reload the System Artifacts successfully | ||
Then Verify the system admin page is navigated successfully | ||
|
||
Scenario:Validate user is able to open compute profile page and create a compute profile for selected provisioner | ||
Given Open Datafusion Project to configure pipeline | ||
When Open "System Admin" menu | ||
Then Click on the Configuration link on the System admin page | ||
Then Click on the Compute Profile from the System admin page | ||
Then Click on create compute profile button | ||
Then Select a provisioner: "remoteHadoopProvisioner" for the compute profile | ||
Then Verify the Create a Profile page is loaded for selected provisioner | ||
Then Enter input plugin property: "profileLabel" with value: "validProfile" | ||
Then Enter textarea plugin property: "profileDescription" with value: "validDescription" | ||
Then Enter input plugin property: "host" with value: "testHost" | ||
Then Enter input plugin property: "user" with value: "testUser" | ||
Then Enter textarea plugin property: "sshKey" with value: "testSSHKey" | ||
Then Click on: "Create" button in the properties | ||
Then Verify the created compute profile: "validProfile" is displayed in system compute profile list |
65 changes: 65 additions & 0 deletions
65
cdap-e2e-tests/src/e2e-test/features/systemadmin/SysAdminDesignTimeValidation.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# | ||
# 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. | ||
# | ||
|
||
@Sysadmin | ||
Feature: Sysadmin - Validate system admin page design time validation scenarios | ||
|
||
@SysAdminRequired | ||
Scenario:Validate user is able reset the system preferences added inside system admin successfully | ||
Given Open Datafusion Project to configure pipeline | ||
When Open "System Admin" menu | ||
Then Click on the Configuration link on the System admin page | ||
Then Select "systemPreferences" option from Configuration page | ||
Then Click on edit system preferences | ||
Then Set system preferences with key: "keyValue" and value: "systemPreferences1" | ||
Then Reset the preferences | ||
Then Verify the reset is successful for added preferences | ||
|
||
Scenario:To verify the validation error message with invalid cluster name | ||
Given Open Datafusion Project to configure pipeline | ||
When Open "System Admin" menu | ||
Then Click on the Configuration link on the System admin page | ||
Then Click on the Compute Profile from the System admin page | ||
Then Click on create compute profile button | ||
Then Select a provisioner: "existingDataProc" for the compute profile | ||
Then Enter input plugin property: "profileLabel" with value: "validProfile" | ||
Then Enter textarea plugin property: "profileDescription" with value: "validDescription" | ||
Then Enter input plugin property: "clusterName" with value: "invalidClusterName" | ||
Then Click on: "Create" button in the properties | ||
Then Verify that the compute profile is displaying an error message: "errorInvalidClusterName" on the footer | ||
|
||
Scenario:To verify the validation error message with invalid profile name | ||
Given Open Datafusion Project to configure pipeline | ||
When Open "System Admin" menu | ||
Then Click on the Configuration link on the System admin page | ||
Then Click on the Compute Profile from the System admin page | ||
Then Click on create compute profile button | ||
Then Select a provisioner: "existingDataProc" for the compute profile | ||
Then Enter input plugin property: "profileLabel" with value: "invalidProfile" | ||
Then Enter textarea plugin property: "profileDescription" with value: "validDescription" | ||
Then Enter input plugin property: "clusterName" with value: "validClusterName" | ||
Then Click on: "Create" button in the properties | ||
Then Verify that the compute profile is displaying an error message: "errorInvalidProfileName" on the footer | ||
|
||
Scenario:To verify the validation error message with invalid namespace name | ||
Given Open Datafusion Project to configure pipeline | ||
When Open "System Admin" menu | ||
Then Click on the Configuration link on the System admin page | ||
Then Click on Create New Namespace button | ||
Then Enter the New Namespace Name with value: "invalidNamespaceName" | ||
Then Enter the Namespace Description with value: "validNamespaceDescription" | ||
Then Click on: "Finish" button in the properties | ||
Then Verify the failed error message: "errorInvalidNamespace" displayed on dialog box |
Oops, something went wrong.