Skip to content

Commit

Permalink
accepting arg pkg_idenent
Browse files Browse the repository at this point in the history
Signed-off-by: nikhil2611 <[email protected]>
  • Loading branch information
nikhil2611 committed Dec 6, 2024
1 parent 64568ec commit f38ede3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion habitat/tests/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -euo pipefail


project_root="$(git rev-parse --show-toplevel)"
pkg_ident="$1"

# print error message followed by usage and exit
error () {
Expand All @@ -19,6 +20,6 @@ package_version=$(awk -F / '{print $3}' <<<"$pkg_ident")

cd "${project_root}"

echo "--- :msg_right: Testing ${pkg_ident} executables"
echo "--- :mag_right: Testing ${pkg_ident} executables"
actual_version=$(hab pkg exec "${pkg_ident}" cookstyle -v | sed -n 's/^Cookstyle \([0-9.]*\).*$/\1/p')
[[ "$package_version" = "$actual_version" ]] || error "cookstyle version is not the expected version. Expected '$package_version', got '$actual_version'"

0 comments on commit f38ede3

Please sign in to comment.