Add functional tests to verify vm creation using all supported API versions
@@ -1505,10 +1505,12 @@ var _ = Describe("[rfe_id:1177][crit:medium][vendor:cnv-qe@redhat.com][level:com
Expect(strings.HasPrefix(stdErr, "Error from server (AlreadyExists): error when creating")).To(BeTrue(), "command should error when creating VM second time")
})
- It("[test_id:299]should create VM via command line", func() {
+ table.DescribeTable("[test_id:299]should create VM via command line using all supported API versions", func(version string) {
vmi = tests.NewRandomVMIWithEphemeralDisk(cd.ContainerDiskFor(cd.ContainerDiskAlpine))
vm := tests.NewRandomVirtualMachine(vmi, true)
+ vm.APIVersion = version
+
vmJson, err = tests.GenerateVMJson(vm, workDir)
Expect(err).ToNot(HaveOccurred(), "Cannot generate VMs manifest")
@@ -1535,7 +1537,10 @@ var _ = Describe("[rfe_id:1177][crit:medium][vendor:cnv-qe@redhat.com][level:com
Expect(err).ToNot(HaveOccurred())
Expect(vmRunningRe.FindString(stdout)).ToNot(Equal(""), "VMI is not Running")
- })
+ },
+ table.Entry("with v1 api", "kubevirt.io/v1"),
+ table.Entry("with v1alpha3 api", "kubevirt.io/v1alpha3"),
+ )
It("[test_id:264]should create and delete via command line", func() {
vmi = tests.NewRandomVMIWithEphemeralDisk(cd.ContainerDiskFor(cd.ContainerDiskAlpine))
