From 57b1828117a72740ad5c6d530948e8d6543379ef Mon Sep 17 00:00:00 2001 From: Jan Dubois Date: Tue, 3 Dec 2024 17:55:49 -0800 Subject: [PATCH] BATS workaround the failure to fetch k3s-versions.json See https://github.com/rancher-sandbox/rancher-desktop/issues/7853 You need to copy k3s-versions.json into the BATS directory to activate the workaround. Signed-off-by: Jan Dubois --- bats/tests/helpers/vm.bash | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bats/tests/helpers/vm.bash b/bats/tests/helpers/vm.bash index cedbd0d5e06..1ab2cc8efa5 100644 --- a/bats/tests/helpers/vm.bash +++ b/bats/tests/helpers/vm.bash @@ -259,6 +259,12 @@ launch_the_application() { local args=("$@") trace "$*" + # TODO workaround for https://github.com/rancher-sandbox/rancher-desktop/issues/7853 + local k3s_versions="k3s-versions.json" + if [ -f "$PATH_BATS_ROOT/$k3s_versions" ]; then + cat "$PATH_BATS_ROOT/$k3s_versions" | create_file "$PATH_CACHE/$k3s_versions" + fi + if using_dev_mode; then # translate args back into the internal API format local api_args=()