From d50825d889e070a517869315dc10cd9b341b87cd Mon Sep 17 00:00:00 2001 From: Sebastian Sch Date: Thu, 19 Oct 2023 01:07:17 +0300 Subject: [PATCH] Add e2e test policy creation retry add a retry to the policy create to fix OCP CI flake also update the ocp version to latest 4.14 rc release Signed-off-by: Sebastian Sch --- .github/workflows/test.yml | 6 ++++++ hack/run-e2e-conformance-virtual-ocp.sh | 4 ++-- test/conformance/tests/test_sriov_operator.go | 15 +++++++++------ 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1ff07eed9f..f3873ce617 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -145,3 +145,9 @@ jobs: with: name: ocp-artifact path: ./ocp-artifacts + + - name: remove virtual cluster + if: always() + run: | + kcli delete cluster $CLUSTER_NAME -y + kcli delete network $CLUSTER_NAME -y diff --git a/hack/run-e2e-conformance-virtual-ocp.sh b/hack/run-e2e-conformance-virtual-ocp.sh index a23410b040..03ac630ca9 100755 --- a/hack/run-e2e-conformance-virtual-ocp.sh +++ b/hack/run-e2e-conformance-virtual-ocp.sh @@ -41,8 +41,8 @@ kcli create network -c 192.168.123.0/24 ocp kcli create network -c 192.168.${virtual_router_id}.0/24 --nodhcp -i $cluster_name cat < ./${cluster_name}-plan.yaml -tag: 4.14.0-rc.1 -ctlplane_memory: 24576 +tag: 4.14.0-rc.6 +ctlplane_memory: 32768 worker_memory: 8192 pool: default disk_size: 50 diff --git a/test/conformance/tests/test_sriov_operator.go b/test/conformance/tests/test_sriov_operator.go index ac120e5251..a206bf4d9b 100644 --- a/test/conformance/tests/test_sriov_operator.go +++ b/test/conformance/tests/test_sriov_operator.go @@ -143,8 +143,9 @@ var _ = Describe("[sriov] operator", func() { cfg.Spec.ConfigDaemonNodeSelector = map[string]string{ "sriovenabled": "true", } - err = clients.Update(context.TODO(), &cfg) - Expect(err).ToNot(HaveOccurred()) + Eventually(func() error { + return clients.Update(context.TODO(), &cfg) + }, 1*time.Minute, 5*time.Second).ShouldNot(HaveOccurred()) By("Checking that a daemon is scheduled only on selected node") Eventually(func() bool { @@ -159,8 +160,9 @@ var _ = Describe("[sriov] operator", func() { }, &cfg) Expect(err).ToNot(HaveOccurred()) cfg.Spec.ConfigDaemonNodeSelector = map[string]string{} - err = clients.Update(context.TODO(), &cfg) - Expect(err).ToNot(HaveOccurred()) + Eventually(func() error { + return clients.Update(context.TODO(), &cfg) + }, 1*time.Minute, 5*time.Second).ShouldNot(HaveOccurred()) By("Checking that a daemon is scheduled on each worker node") Eventually(func() bool { @@ -2316,8 +2318,9 @@ func createVanillaNetworkPolicy(node string, sriovInfos *cluster.EnabledNodes, n DeviceType: "netdevice", }, } - err = clients.Create(context.Background(), config) - Expect(err).ToNot(HaveOccurred()) + Eventually(func() error { + return clients.Create(context.Background(), config) + }, 1*time.Minute, 5*time.Second).ShouldNot(HaveOccurred()) Eventually(func() sriovv1.Interfaces { nodeState, err := clients.SriovNetworkNodeStates(operatorNamespace).Get(context.Background(), node, metav1.GetOptions{})