-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Lenin Mehedy <lenin.mehedy@swirldslabs.com>
- Loading branch information
1 parent
d229e8c
commit b190fa3
Showing
5 changed files
with
31 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
[submodule "charts/hedera-network/tests/bats"] | ||
path = dev/tests/bats | ||
path = charts/hedera-network/tests/bats | ||
url = https://github.com/bats-core/bats-core.git | ||
[submodule "dev/tests/test_helper/bats-support"] | ||
[submodule "charts/hedera-network/tests/test_helper/bats-support"] | ||
path = charts/hedera-network/tests/test_helper/bats-support | ||
url = https://github.com/bats-core/bats-support.git | ||
[submodule "dev/tests/test_helper/bats-assert"] | ||
[submodule "charts/hedera-network/tests/test_helper/bats-assert"] | ||
path = charts/hedera-network/tests/test_helper/bats-assert | ||
url = https://github.com/bats-core/bats-assert.git |
Submodule bats-assert
added at
42e4d8
Submodule bats-support
added at
3c8fad
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,25 @@ | ||
#!/usr/bin/env bash | ||
|
||
_common_setup() { | ||
load 'test_helper/bats-support/load' | ||
load 'test_helper/bats-assert/load' | ||
# get the containing directory of this file | ||
# use $BATS_TEST_FILENAME instead of ${BASH_SOURCE[0]} or $0, | ||
# as those will point to the bats executable's location or the preprocessed file respectively | ||
PROJECT_ROOT="$( cd "$( dirname "$BATS_TEST_FILENAME" )" >/dev/null 2>&1 && pwd )" | ||
# make executables in src/ visible to PATH | ||
PATH="$PROJECT_ROOT/scripts:$PATH" | ||
|
||
# setup TEST_SCRIPTS | ||
SCRIPT_DIR="${PROJECT_ROOT}/scripts" | ||
|
||
# load test functions | ||
source "$SCRIPT_DIR/include.sh" | ||
} | ||
|
||
# This is to check the bats test execution status | ||
check_test_status() { | ||
echo "status = ${status}" | ||
echo "output = ${output}" | ||
[[ "${status}" -eq 0 ]] | ||
} |