From 3ae9fcbb892f6d9292d437e21b8aab6b167826aa Mon Sep 17 00:00:00 2001 From: Loic Devulder Date: Tue, 8 Oct 2024 16:12:34 +0200 Subject: [PATCH] ci/cli: fix migration test with RKE2 Signed-off-by: Loic Devulder --- .github/workflows/cli-full-backup-restore-matrix.yaml | 4 ++-- tests/e2e/suite_test.go | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cli-full-backup-restore-matrix.yaml b/.github/workflows/cli-full-backup-restore-matrix.yaml index 9bc3dd034..86f3e2f2f 100644 --- a/.github/workflows/cli-full-backup-restore-matrix.yaml +++ b/.github/workflows/cli-full-backup-restore-matrix.yaml @@ -10,11 +10,11 @@ on: type: boolean k8s_downstream_version: description: Rancher cluster downstream version to use - default: '"v1.27.13+k3s1"' + default: '"v1.30.4+k3s1"' type: string k8s_upstream_version: description: Rancher cluster upstream version to use - default: '"v1.27.13+k3s1"' + default: '"v1.30.4+k3s1"' type: string qase_run_id: description: Qase run ID where the results will be reported diff --git a/tests/e2e/suite_test.go b/tests/e2e/suite_test.go index a410cacb3..8fa211d7c 100644 --- a/tests/e2e/suite_test.go +++ b/tests/e2e/suite_test.go @@ -541,6 +541,11 @@ func StartRKE2() { err = exec.Command("sudo", "systemctl", "enable", "--now", "rke2-server.service").Run() Expect(err).To(Not(HaveOccurred())) + // Be sure that any previous kubectl command has been removed before linking the new one + err = exec.Command("sudo", "rm", "-f", "/usr/local/bin/kubectl").Run() + Expect(err).To(Not(HaveOccurred())) + + // Create kubectl link err = exec.Command("sudo", "ln", "-s", "/var/lib/rancher/rke2/bin/kubectl", "/usr/local/bin/kubectl").Run() Expect(err).To(Not(HaveOccurred())) }