-
Notifications
You must be signed in to change notification settings - Fork 252
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2676 from gavindidrichsen/gavindidrichsen/acl_add…
…_tests [acl] Add tests to core/acl for linux plan
- Loading branch information
Showing
3 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@test "Version matches plan" { | ||
TEST_PKG_VERSION="$(echo "${TEST_PKG_IDENT}" | cut -d/ -f3)" | ||
actual_version="$(hab pkg exec "${TEST_PKG_IDENT}" getfacl --version | awk '{print $2}')" | ||
[[ "$actual_version" = "${TEST_PKG_VERSION}" ]] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/sh | ||
set -euo pipefail | ||
|
||
#/ Usage: test.sh <pkg_ident> | ||
#/ | ||
#/ Example: test.sh core/opa/0.11.0/20190531065119 | ||
#/ | ||
|
||
TESTDIR="$(dirname "${0}")" | ||
|
||
if [[ -z "${1:-}" ]]; then | ||
grep '^#/' < "${0}" | cut -c4- | ||
exit 1 | ||
fi | ||
|
||
TEST_PKG_IDENT="$1" | ||
|
||
hab pkg install core/bats --binlink | ||
hab pkg install "$TEST_PKG_IDENT" | ||
|
||
export TEST_PKG_IDENT | ||
bats "${TESTDIR}/test.bats" |