Skip to content

Commit

Permalink
Add e2e test policy creation retry
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
SchSeba committed Oct 20, 2023
1 parent bf595e4 commit d50825d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions hack/run-e2e-conformance-virtual-ocp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<EOF > ./${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
Expand Down
15 changes: 9 additions & 6 deletions test/conformance/tests/test_sriov_operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down Expand Up @@ -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{})
Expand Down

0 comments on commit d50825d

Please sign in to comment.