diff --git a/habitat/tests/test.sh b/habitat/tests/test.sh index 39fb6042..5edab835 100755 --- a/habitat/tests/test.sh +++ b/habitat/tests/test.sh @@ -20,7 +20,8 @@ package_version=$(awk -F / '{print $3}' <<<"$pkg_ident") cd "${project_root}" echo "Testing ${pkg_ident} executables" version=$(hab pkg exec "${pkg_ident}" chef-cli -v) -actual_version= $(echo $version | sed -E 's/.*version: ([0-9]+\.[0-9]+\.[0-9]+).*/\1/') +echo $version +actual_version= $(echo "$version" | sed -E 's/.*version: ([0-9]+\.[0-9]+\.[0-9]+).*/\1/') [[ "$package_version" = "$actual_version" ]] || error "chef-cli version is not the expected version. Expected '$package_version', got '$actual_version'" diff --git a/s.sh b/s.sh new file mode 100755 index 00000000..4f7668d9 --- /dev/null +++ b/s.sh @@ -0,0 +1,5 @@ +pkg_ident="sanghinitin/chef-cli/5.6.15/20241205082855" +version=$(hab pkg exec "${pkg_ident}" chef-cli -v) +echo $version +actual_version=$(echo "$version" | sed -E 's/.*version: ([0-9]+\.[0-9]+\.[0-9]+).*/\1/') +echo $actual_version