-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement: Use Sandbox for Testing #360
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
dad6d1e
Enhancement: Use Sandbox for Testing
ffb2347
almost passing
62ab557
dependent 2nd order removals
a601bc3
per CR: try to percolate a read error, instead of sweeping under the …
2c6b93a
unswallow more err's
e293ed5
don't default to deleting local features, and introduce verbose mode
5fd47ef
Update test-harness.sh
tzaffi 46e3138
variable for destination test directory
4c521a5
Update .test-env
tzaffi 9d842a9
bite the bullet and seperate out the cucumber tags
9514d6a
quotes
dc02aeb
display-all-go-steps used by Unused Steps Script
0d40c4a
removing steps after Unused Steps Analysis Script
58c3684
Merge remote-tracking branch 'origin' into sandbox-sdk-testing
be7c151
add note about starting test harness without running all tests
4cd2d66
Update .test-env
tzaffi 2951489
remove comment from make display-* command
tzaffi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Configs for testing repo download: | ||
SDK_TESTING_URL="https://github.com/algorand/algorand-sdk-testing" | ||
SDK_TESTING_BRANCH="master" | ||
SDK_TESTING_HARNESS="test-harness" | ||
|
||
VERBOSE_HARNESS=0 | ||
|
||
# WARNING: If set to 1, new features will be LOST when downloading the test harness. | ||
# REGARDLESS: modified features are ALWAYS overwritten. | ||
REMOVE_LOCAL_FEATURES=0 | ||
|
||
# WARNING: Be careful when turning on the next variable. | ||
# In that case you'll need to provide all variables expected by `algorand-sdk-testing`'s `.env` | ||
OVERWRITE_TESTING_ENVIRONMENT=0 |
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
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,62 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
START=$(date "+%s") | ||
|
||
THIS=$(basename "$0") | ||
ENV_FILE=".test-env" | ||
TEST_DIR="test" | ||
|
||
set -a | ||
source "$ENV_FILE" | ||
set +a | ||
|
||
rootdir=$(dirname "$0") | ||
pushd "$rootdir" | ||
|
||
## Reset test harness | ||
if [ -d "$SDK_TESTING_HARNESS" ]; then | ||
pushd "$SDK_TESTING_HARNESS" | ||
./scripts/down.sh | ||
popd | ||
rm -rf "$SDK_TESTING_HARNESS" | ||
else | ||
echo "$THIS: directory $SDK_TESTING_HARNESS does not exist - NOOP" | ||
fi | ||
|
||
git clone --depth 1 --single-branch --branch "$SDK_TESTING_BRANCH" "$SDK_TESTING_URL" "$SDK_TESTING_HARNESS" | ||
|
||
|
||
if [[ $OVERWRITE_TESTING_ENVIRONMENT == 1 ]]; then | ||
echo "$THIS: OVERWRITE replaced $SDK_TESTING_HARNESS/.env with $ENV_FILE:" | ||
cp "$ENV_FILE" "$SDK_TESTING_HARNESS"/.env | ||
fi | ||
|
||
## Copy feature files into the project resources | ||
if [[ $REMOVE_LOCAL_FEATURES == 1 ]]; then | ||
echo "$THIS: OVERWRITE wipes clean $TEST_DIR/features" | ||
if [[ $VERBOSE_HARNESS == 1 ]]; then | ||
( tree $TEST_DIR/features && echo "$THIS: see the previous for files deleted" ) || true | ||
fi | ||
rm -rf $TEST_DIR/features | ||
fi | ||
mkdir -p $TEST_DIR/features | ||
cp -r "$SDK_TESTING_HARNESS"/features/* $TEST_DIR/features | ||
if [[ $VERBOSE_HARNESS == 1 ]]; then | ||
( tree $TEST_DIR/features && echo "$THIS: see the previous for files copied over" ) || true | ||
fi | ||
echo "$THIS: seconds it took to get to end of cloning and copying: $(($(date "+%s") - START))s" | ||
|
||
|
||
## Start test harness environment | ||
pushd "$SDK_TESTING_HARNESS" | ||
./scripts/up.sh | ||
popd | ||
echo "$THIS: seconds it took to finish testing sdk's up.sh: $(($(date "+%s") - START))s" | ||
echo "" | ||
echo "--------------------------------------------------------------------------------" | ||
echo "|" | ||
echo "| To run sandbox commands, cd into $SDK_TESTING_HARNESS/.sandbox " | ||
echo "|" | ||
echo "--------------------------------------------------------------------------------" |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cucumber tags now reside in:
test/unit.tags
test/integration.tags