Skip to content

Commit

Permalink
Testing pipleine (#242)
Browse files Browse the repository at this point in the history
* Testing pipleine

Signed-off-by: nitin sanghi <[email protected]>

* Testing pipleine

Signed-off-by: nitin sanghi <[email protected]>

* Testing pipleine

Signed-off-by: nitin sanghi <[email protected]>

* Path change for test file

Signed-off-by: nitin sanghi <[email protected]>

* adding locales

Signed-off-by: nitin sanghi <[email protected]>

* adding locales

Signed-off-by: nitin sanghi <[email protected]>

* adding locales

Signed-off-by: nitin sanghi <[email protected]>

* adding locales

Signed-off-by: nitin sanghi <[email protected]>

* adding locales

Signed-off-by: nitin sanghi <[email protected]>

* adding locales

Signed-off-by: nitin sanghi <[email protected]>

* adding locales

Signed-off-by: nitin sanghi <[email protected]>

* adding locales

Signed-off-by: nitin sanghi <[email protected]>

* adding locales

Signed-off-by: nitin sanghi <[email protected]>

* adding locales

Signed-off-by: nitin sanghi <[email protected]>

* ignoring warn change sed regex

Signed-off-by: nitin sanghi <[email protected]>

* ignoring warn change sed regex

Signed-off-by: nitin sanghi <[email protected]>

* ignoring warn change sed regex

Signed-off-by: nitin sanghi <[email protected]>

* ignoring warn change sed regex

Signed-off-by: nitin sanghi <[email protected]>

* change version command

Signed-off-by: nitin sanghi <[email protected]>

* change version command

Signed-off-by: nitin sanghi <[email protected]>

* change version command

Signed-off-by: nitin sanghi <[email protected]>

* change version command

Signed-off-by: nitin sanghi <[email protected]>

* change version command

Signed-off-by: nitin sanghi <[email protected]>

* change version command

Signed-off-by: nitin sanghi <[email protected]>

* change version command regex

Signed-off-by: nitin sanghi <[email protected]>

---------

Signed-off-by: nitin sanghi <[email protected]>
  • Loading branch information
sanghinitin authored Dec 6, 2024
1 parent 2f889d7 commit c95378d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .expeditor/buildkite/artifact.habitat.test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Push-Location $project_root

try {
Write-Host "Running unit tests..."
/habitat/tests/test.ps1 $pkg_ident
habitat/tests/test.ps1 $pkg_ident
}
finally {
# Ensure we always return to the original directory
Expand Down
1 change: 0 additions & 1 deletion .expeditor/buildkite/artifact.habitat.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ if [ -f ./results/last_build.env ]; then
. ./results/last_build.env
export pkg_artifact
fi

echo "+++ Installing ${pkg_ident:?is undefined}"
echo "++++"
echo $project_root
Expand Down
2 changes: 2 additions & 0 deletions .expeditor/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ rubygems:
release_branches:
- workstation-LTS:
version_constraint: 5.*
- main:
version_constraint: 5.*
github:
# This deletes the GitHub PR branch after successfully merged into the release branch
delete_branch_on_merge: true
Expand Down
3 changes: 2 additions & 1 deletion .expeditor/habitat-test.pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ expeditor:
automatic:
limit: 1


steps:

- label: ":linux: Validate Habitat Builds of Chef-cli"
commands:
- habitat/tests/test.sh
- .expeditor/buildkite/artifact.habitat.test.sh
expeditor:
executor:
docker:
Expand Down
14 changes: 9 additions & 5 deletions habitat/tests/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,13 @@ error () {
package_version=$(awk -F / '{print $3}' <<<"$pkg_ident")

cd "${project_root}"

echo "--- :mag_right: Testing ${pkg_ident} executables"
actual_version=$(hab pkg exec "${pkg_ident}" chef-cli -v | 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'"

echo "Testing ${pkg_ident} executables"
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

if [[ "$actual_version" != *"$package_version"* ]]; then
error "chef-cli version is not the expected version. Expected '$package_version', got '$actual_version'"
fi

0 comments on commit c95378d

Please sign in to comment.