Skip to content

Commit

Permalink
Create a test suite for kubevirt plugin
Browse files Browse the repository at this point in the history
Signed-off-by: Ido Rosenzwig <irosenzw@redhat.com>
  • Loading branch information
irosenzw committed Jun 8, 2020
1 parent ab42522 commit 438ec07
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
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
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();
});
});
3 changes: 3 additions & 0 deletions frontend/packages/kubevirt-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
],
"kubevirt-v2v": [
"integration-tests/v2v/*.scenario.ts"
],
"kubevirt-gating": [
"integration-tests/tests/example.scenario.ts"
]
}
}
Expand Down
13 changes: 13 additions & 0 deletions test-suites.sh
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

0 comments on commit 438ec07

Please sign in to comment.