Skip to content

Commit

Permalink
fix kubevirt e2e (#3729)
Browse files Browse the repository at this point in the history
Signed-off-by: zhangzujian <[email protected]>
  • Loading branch information
zhangzujian authored Feb 19, 2024
1 parent d265d78 commit 9abe921
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-x86-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1492,7 +1492,7 @@ jobs:
sudo cp -r /root/.kube/ ~/.kube/
sudo chown -R $(id -un). ~/.kube/
- name: Install Kube-OVN
- name: Install Kube-OVN and KubeVirt
run: make kind-install-kubevirt

- name: Run E2E
Expand Down
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -761,14 +761,15 @@ kind-install-kubevirt: kind-install

kubectl apply -f "$(KUBEVIRT_OPERATOR_YAML)"
kubectl apply -f "$(KUBEVIRT_CR_YAML)"
kubectl rollout status deployment/virt-operator -n kubevirt --timeout 120s
echo "wait kubevirt releated pod running ..."
sleep 60

kubectl -n kubevirt patch kubevirt kubevirt --type=merge --patch '{"spec":{"configuration":{"developerConfiguration":{"useEmulation":true}}}}'
$(call kubectl_wait_exist_and_ready,kubevirt,deployment,virt-operator)
$(call kubectl_wait_exist_and_ready,kubevirt,deployment,virt-api)
$(call kubectl_wait_exist_and_ready,kubevirt,deployment,virt-controller)
$(call kubectl_wait_exist_and_ready,kubevirt,daemonset,virt-handler)

kubectl apply -f "$(KUBEVIRT_TEST_YAML)"
sleep 5
kubectl patch vm testvm --type=merge --patch '{"spec":{"running":true}}'
kubectl wait vm testvm --for=condition=Ready --timeout=2m

.PHONY: kind-install-lb-svc
kind-install-lb-svc:
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/kubevirt/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ var _ = framework.Describe("[group:kubevirt]", func() {
LabelSelector: "vm.kubevirt.io/name=testvm",
})
framework.ExpectNoError(err)
framework.ExpectEqual(len(podList.Items), 1)
framework.ExpectHaveLen(podList.Items, 1)

ginkgo.By("Validating pod annotations")
pod := podList.Items[0]
Expand All @@ -65,7 +65,7 @@ var _ = framework.Describe("[group:kubevirt]", func() {
LabelSelector: "vm.kubevirt.io/name=testvm",
})
framework.ExpectNoError(err)
framework.ExpectEqual(len(podList.Items), 1)
framework.ExpectHaveLen(podList.Items, 1)

ginkgo.By("Validating new pod annotations")
pod = podList.Items[0]
Expand Down

0 comments on commit 9abe921

Please sign in to comment.