We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Since 0.17.2, the unit tests fail if there's no sudo available on the host machine. I think this has been introduced in #620.
sudo
=== RUN TestK0sInstallCommand DEBUG [local] localhost: executing uname | grep -q Linux DEBUG [local] localhost: executing cat /etc/os-release || cat /usr/lib/os-release DEBUG [local] localhost: NAME="Alpine Linux" DEBUG [local] localhost: ID=alpine DEBUG [local] localhost: VERSION_ID=3.20.0_alpha20231219 DEBUG [local] localhost: PRETTY_NAME="Alpine Linux edge" DEBUG [local] localhost: HOME_URL="https://alpinelinux.org/" DEBUG [local] localhost: BUG_REPORT_URL="https://gitlab.alpinelinux.org/alpine/aports/-/issues" DEBUG [local] localhost: executing [ "$(id -u)" = 0 ] DEBUG [local] localhost: executing sudo -n true DEBUG [local] localhost: (stderr) sh: sudo: not found DEBUG [local] localhost: executing doas -n -- "${SHELL-sh}" -c true host_test.go:82: Error Trace: github.com/k0sproject/k0sctl/pkg/apis/k0sctl.k0sproject.io/v1beta1/cluster/host_test.go:82 Error: Should be true Test: TestK0sInstallCommand --- FAIL: TestK0sInstallCommand (0.01s)
uname | grep -q Linux
cat /etc/os-release || cat /usr/lib/os-release
[ "$(id -u)" = 0 ]
sudo -n true
doas -n -- "${SHELL-sh}" -c true
The text was updated successfully, but these errors were encountered:
/xref https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/58634#note_368606
Sorry, something went wrong.
Actually it's probably because the doasifier wraps the command in quotes and escapes ".
doas
"
require.True(t, strings.HasSuffix(cmd, `k0s install worker --data-dir=/tmp/k0s --token-file "from-configurer"`))
func sudoDoas(cmd string) string { return `doas -n -- "${SHELL-sh}" -c ` + shellescape.Quote(cmd) }
Successfully merging a pull request may close this issue.
Since 0.17.2, the unit tests fail if there's no
sudo
available on the host machine. I think this has been introduced in #620.The text was updated successfully, but these errors were encountered: