-
Notifications
You must be signed in to change notification settings - Fork 592
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create a test suite for kubevirt plugin
Signed-off-by: Ido Rosenzwig <irosenzw@redhat.com>
- Loading branch information
Showing
4 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
frontend/packages/kubevirt-plugin/integration-tests/deploy-kubevirt-gating.sh
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,21 @@ | ||
export KUBEVIRT_VERSION=$(curl -s https://github.com/kubevirt/kubevirt/releases/latest | grep -o "v[0-9]\.[0-9]*\.[0-9]*") | ||
export CDI_VERSION=$(curl -s https://github.com/kubevirt/containerized-data-importer/releases/latest | grep -o "v[0-9]\.[0-9]*\.[0-9]*") | ||
|
||
# Create openshift-cnv namespace for Integration Tests | ||
oc create namespace openshift-cnv | ||
|
||
# Deploy Kubevirt, Storage, CDI Pods | ||
oc create -f https://github.com/kubevirt/kubevirt/releases/download/$KUBEVIRT_VERSION/kubevirt-operator.yaml | ||
|
||
oc create -f https://github.com/kubevirt/kubevirt/releases/download/$KUBEVIRT_VERSION/kubevirt-cr.yaml | ||
|
||
oc create -f https://raw.githubusercontent.com/kubevirt/kubevirt.github.io/master/labs/manifests/storage-setup.yml | ||
|
||
oc create -f https://github.com/kubevirt/containerized-data-importer/releases/download/$CDI_VERSION/cdi-operator.yaml | ||
|
||
oc create -f https://github.com/kubevirt/containerized-data-importer/releases/download/$CDI_VERSION/cdi-cr.yaml | ||
|
||
# Deploy Common Templates | ||
oc project openshift | ||
oc create -f https://raw.githubusercontent.com/MarSik/kubevirt-ssp-operator/master/roles/KubevirtCommonTemplatesBundle/files/common-templates-v0.11.0.yaml | ||
oc project default |
11 changes: 11 additions & 0 deletions
11
frontend/packages/kubevirt-plugin/integration-tests/tests/example.scenario.ts
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,11 @@ | ||
import { browser } from 'protractor'; | ||
import { isLoaded } from '@console/internal-integration-tests/views/crud.view'; | ||
import { appHost, testName } from '@console/internal-integration-tests/protractor.conf'; | ||
|
||
// This is an dummy test - for development only. | ||
describe('Successful example test', () => { | ||
it('Navigate to virtualization page', async () => { | ||
await browser.get(`${appHost}/k8s/ns/${testName}/virtualization`); | ||
await isLoaded(); | ||
}); | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
# Usage: | ||
# Run the script providing suite names as arguments as they appear in | ||
# frontend/integration-tests/protractor.conf.ts | ||
|
||
cd frontend | ||
for suite in "$@" | ||
do | ||
yarn run test-suite --suite "${suite}" --params.openshift true | ||
done |