Skip to content

Commit

Permalink
Merge pull request #8398 from gouyang/add_annotation
Browse files Browse the repository at this point in the history
Bug 1939869: Add annotations to datavolume for HPP
  • Loading branch information
openshift-merge-robot committed Mar 17, 2021
2 parents 5638151 + 859b087 commit 14c05ac
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { testName } from '@console/internal-integration-tests/protractor.conf';
import { browser, ExpectedConditions as until } from 'protractor';
import {
click,
createResource,
removeLeakedResources,
withResource,
withResources,
Expand Down Expand Up @@ -40,6 +41,7 @@ import { VMBuilder } from './models/vmBuilder';
import { VMTemplateBuilder } from './models/vmtemplateBuilder';
import { getBasicVMBuilder, getBasicVMTBuilder } from './mocks/vmBuilderPresets';
import { uploadOSImage } from './utils/utils';
import { AccessMode, VolumeMode, getTestDataVolume } from './mocks/mocks';

function imagePull(src, dest) {
if (src === CIRROS_IMAGE) {
Expand Down Expand Up @@ -215,9 +217,22 @@ describe('KubeVirt Auto Clone', () => {
const vmTemplate = new VMTemplateBuilder(getBasicVMTBuilder())
.setName(TemplateByName.RHEL8)
.build();
let volumeMode;
if (VolumeMode === 'Filesystem') {
volumeMode = false;
}
if (VolumeMode === 'Block') {
volumeMode = true;
}

beforeAll(async () => {
uploadOSImage('rhel8', GOLDEN_OS_IMAGES_NS, cirrosPVC.image, 'ReadWriteMany', true);
if (STORAGE_CLASS === 'ocs-storagecluster-ceph-rbd') {
uploadOSImage('rhel8', GOLDEN_OS_IMAGES_NS, cirrosPVC.image, AccessMode, volumeMode);
}
if (STORAGE_CLASS === 'hostpath-provisioner') {
const testDV = getTestDataVolume('rhel8', GOLDEN_OS_IMAGES_NS);
createResource(testDV);
}
});

afterAll(async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ export const dataVolumeManifest = ({ name, namespace, sourceURL, accessMode, vol
metadata: {
name,
namespace,
annotations: {
'cdi.kubevirt.io/storage.bind.immediate.requested': 'true',
},
},
spec: {
pvc: {
Expand Down

0 comments on commit 14c05ac

Please sign in to comment.