Skip to content

Commit

Permalink
tests: handle old containerd versions with v prefix
Browse files Browse the repository at this point in the history
Handle cases where an older containerd version is prefixed with "v"
so that the operator still installs a newer version for them during
end-to-end tests

Signed-off-by: Chris Porter <porter@ibm.com>
  • Loading branch information
portersrc committed Nov 7, 2023
1 parent 2b1b848 commit 6c272ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/e2e/operator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ build_pre_install_img() {
handle_older_containerd() {
command -v containerd >/dev/null || return
local version
version=$(containerd -v | awk '{ print $3 }')
version=$(containerd -v | awk '{ print $3 }' | sed 's/^v//')
echo "system's containerd version: $version"
if [[ "$version" =~ ^1.6 || "$version" =~ ^1.5 ]]; then
echo "Old system's containerd ($version). Configuring the operator to install a newer one"
Expand Down

0 comments on commit 6c272ba

Please sign in to comment.