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 5add262
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/e2e/operator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ handle_older_containerd() {
local version
version=$(containerd -v | awk '{ print $3 }')
echo "system's containerd version: $version"
if [[ "$version" =~ ^1.6 || "$version" =~ ^1.5 ]]; then
if [[ "$version" =~ ^1.6 || "$version" =~ ^1.5 \
|| "$version" =~ ^v1.6 || "$version" =~ ^v1.5 ]]; then
echo "Old system's containerd ($version). Configuring the operator to install a newer one"
pushd "$project_dir" >/dev/null
for kfile in $(find config/ -name "kustomization.yaml" \
Expand Down

0 comments on commit 5add262

Please sign in to comment.