-
Notifications
You must be signed in to change notification settings - Fork 611
/
validate-virtio-win-image.spec.ts
47 lines (43 loc) · 1.37 KB
/
validate-virtio-win-image.spec.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import { testName } from '../../support';
import { VirtualMachineData } from '../../types/vm';
import { K8S_KIND, TEMPLATE } from '../../utils/const/index';
import { ProvisionSource } from '../../utils/const/provisionSource';
import { vm } from '../../views/vm';
const vmData: VirtualMachineData = {
name: `validate-windows-virtio-${testName}`,
description: 'windows vm',
namespace: testName,
template: TEMPLATE.WIN2K12R2,
provisionSource: ProvisionSource.URL,
pvcSize: '1',
sshEnable: false,
startOnCreation: false,
};
describe('Test vm creation', () => {
before(() => {
cy.Login();
cy.visit('/');
cy.createProject(testName);
cy.visitVMsList();
vm.create(vmData);
});
after(() => {
cy.deleteResource(K8S_KIND.VM, vmData.name, vmData.namespace);
cy.deleteTestProject(testName);
});
it('ID(CNV-6732) [bz1942839] validate virtio-win-image of windows vm', () => {
if (Cypress.env('DOWNSTREAM')) {
cy.exec(
"oc get cm -n kubevirt-hyperconverged v2v-vmware -o jsonpath='{.data.virtio-win-image}'",
).then((result) => {
const image = result.stdout;
cy.exec(
`oc get vm ${vmData.name} -n ${testName} -o jsonpath='{.spec.template.spec.volumes}'`,
).then((result1) => {
const image1 = result1.stdout;
expect(image1).toContain(image);
});
});
}
});
});