From ae4ea76c29d61abb462a0e6e63a7b67b6c145b81b32e624b440071af5517b6b3 Mon Sep 17 00:00:00 2001 From: Vasily Ulyanov Date: Fri, 12 Jan 2024 08:40:12 +0000 Subject: [PATCH] Accepting request 1138241 from home:vulyanov:branches:Virtualization - Fix test with initially invalid DataVolume (bsc#1218174) 0001-tests-Adapt-VM-phase-expectation.patch OBS-URL: https://build.opensuse.org/request/show/1138241 OBS-URL: https://build.opensuse.org/package/show/Virtualization/kubevirt?expand=0&rev=147 --- 0001-tests-Adapt-VM-phase-expectation.patch | 29 +++++++++++++++++++++ kubevirt.changes | 6 +++++ kubevirt.spec | 1 + 3 files changed, 36 insertions(+) create mode 100644 0001-tests-Adapt-VM-phase-expectation.patch diff --git a/0001-tests-Adapt-VM-phase-expectation.patch b/0001-tests-Adapt-VM-phase-expectation.patch new file mode 100644 index 0000000..1e0fa8f --- /dev/null +++ b/0001-tests-Adapt-VM-phase-expectation.patch @@ -0,0 +1,29 @@ +From aa6647c263408bdf0518d74da2d4c37d3bb42de0 Mon Sep 17 00:00:00 2001 +From: Vasiliy Ulyanov +Date: Wed, 13 Dec 2023 08:10:37 +0100 +Subject: [PATCH] tests: Adapt VM phase expectation + +When CDI uses volume populators with malformed DataVolume, the VM +initially transitions to Scheduling phase. + +Signed-off-by: Vasiliy Ulyanov +--- + tests/storage/datavolume.go | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/storage/datavolume.go b/tests/storage/datavolume.go +index 46677257d..9d86d0eac 100644 +--- a/tests/storage/datavolume.go ++++ b/tests/storage/datavolume.go +@@ -536,7 +536,7 @@ var _ = SIGDescribe("DataVolume Integration", func() { + vm, err = virtClient.VirtualMachine(vm.Namespace).Create(context.Background(), vm) + Expect(err).ToNot(HaveOccurred()) + +- Eventually(ThisVMIWith(vm.Namespace, vm.Name), 100).Should(BeInPhase(v1.Pending)) ++ Eventually(ThisVMIWith(vm.Namespace, vm.Name), 100).Should(Or(BeInPhase(v1.Pending), BeInPhase(v1.Scheduling))) + + By("Creating a service which makes the registry reachable") + _, err = virtClient.CoreV1().Services(vm.Namespace).Create(context.Background(), &k8sv1.Service{ +-- +2.43.0 + diff --git a/kubevirt.changes b/kubevirt.changes index ebdac3f..9ed1082 100644 --- a/kubevirt.changes +++ b/kubevirt.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jan 12 06:27:45 UTC 2024 - Vasily Ulyanov + +- Fix test with initially invalid DataVolume (bsc#1218174) + 0001-tests-Adapt-VM-phase-expectation.patch + ------------------------------------------------------------------- Thu Jan 4 06:47:58 UTC 2024 - Vasily Ulyanov diff --git a/kubevirt.spec b/kubevirt.spec index 7bbb2f3..5f91af3 100644 --- a/kubevirt.spec +++ b/kubevirt.spec @@ -41,6 +41,7 @@ Source1: kubevirt_containers_meta Source2: kubevirt_containers_meta.service Source3: %{url}/releases/download/v%{version}/disks-images-provider.yaml Source100: %{name}-rpmlintrc +Patch1: 0001-tests-Adapt-VM-phase-expectation.patch BuildRequires: glibc-devel-static BuildRequires: golang-packaging BuildRequires: pkgconfig