-
Notifications
You must be signed in to change notification settings - Fork 143
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: Trim the indexer images and use the sandbox instead of custom dockers #367
Merged
Merged
Changes from all commits
Commits
Show all changes
65 commits
Select commit
Hold shift + click to select a range
2af8a71
time printout
e47317e
remove the integration indexers
acf8746
"no colors anymore I want them to turn..."
4fc4137
bootstrap till the point of running tests
96e121d
seems to mostly pass now that got the indexer v1 buck in the build
0a4ca51
shell scripts are so fragile
9e09c62
simplify and refactor into Makefile
800e191
bug in Makefile
cd52aba
bug in Makefile
558a042
docker ps in makefile
d04e34e
try docker ps gin
3679626
expose indxer v1 and sandbox configuration
32e7317
Update test-harness.sh
tzaffi 1f06edd
Update Makefile
tzaffi d35731f
no cat or any other animals required
195b28f
Merge branch 'trim-indexer' of github.com:algorand/py-algorand-sdk in…
a6e3cbc
merged
06119ef
revert
tzaffi 40c3352
revert
b3cfc66
python --version sanity check
85afa1e
bring down dockers BEFORE destroying their docker-compose + misc
149646f
Update .test-env
tzaffi b898570
Update .test-env
tzaffi 1341f90
stale log
1cfb783
Update .test-env
tzaffi c1d56e4
Update .test-env
tzaffi 34b3dc0
better end of script verbiage
23c723e
per CR suggestion: `rm -rf` the features
dda5012
trigger build with verbose
707b439
comment in .env
5dab777
try 30,000 rounds
9ca1ad3
don't allow configuring TYPE in the Makefile
6e9c7c3
don't allow configuring TYPE in the Makefile
f8b8092
non-archival node
a7465e5
remove and modify v1 steps
9a5c87f
remove "I get transactions by address and date" for @asset feature
ba76644
commentary
bfe0133
cleanup the cucumber tags
c9a1f44
sandbox branch configurable-ports ---> master
0878b23
vet against the bugfix-sourcing-env-can-break-aliases branch in CI
b0abecf
revert sandbox branch to master after the bugfix was merged
a38d750
revert
0548843
better TODO per CR comments
f66569d
Update test-harness.sh
tzaffi 86bffc5
Update Makefile
tzaffi c646ea0
tempoary: VERBOSE_HARNESS=0 in response to upstream change. TODO: rem…
0ab667d
Merge branch 'trim-indexer' of github.com:algorand/py-algorand-sdk in…
3e3145a
don't overwrite incoming test-harness/.env
c702868
per CR suggestion - no py version in .test-env
0214958
make test-harness.sh more compliant
97ffb86
Update .test-env
tzaffi 748817e
remove more indexer.features steps
a6a2590
Update test-harness.sh
tzaffi aeea8e8
Merge branch 'trim-indexer' of github.com:algorand/py-algorand-sdk in…
e26460f
don't default to deleting local features, and introduce verbose mode
70dada9
variable for destination tests directory
46387c1
separate cucumber tags into their own files
b9593bf
quotes
ea50a0a
Apply suggestions from code review
tzaffi 121927e
Merge remote-tracking branch 'origin' into trim-indexer
309a803
display command for fuzzy matching
9b8a769
lintings
0ca7e91
Unused Steps Analysis cleanup
39d107a
unused import
11dbdc8
Update .test-env
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,24 @@ | ||
UNITS = "@unit.abijson or @unit.abijson.byname or @unit.algod or @unit.algod.ledger_refactoring or @unit.applications or @unit.atc_method_args or @unit.atomic_transaction_composer or @unit.dryrun or @unit.dryrun.trace.application or @unit.feetest or @unit.indexer or @unit.indexer.ledger_refactoring or @unit.indexer.logs or @unit.offline or @unit.rekey or @unit.transactions.keyreg or @unit.responses or @unit.responses.231 or @unit.tealsign or @unit.transactions or @unit.transactions.payment or @unit.responses.unlimited_assets or @unit.sourcemap" | ||
UNIT_TAGS := "$(subst :, or ,$(shell awk '{print $2}' tests/unit.tags | paste -s -d: -))" | ||
INTEGRATION_TAGS := "$(subst :, or ,$(shell awk '{print $2}' tests/integration.tags | paste -s -d: -))" | ||
|
||
unit: | ||
behave --tags=$(UNITS) tests -f progress2 | ||
behave --tags=$(UNIT_TAGS) tests -f progress2 | ||
|
||
INTEGRATIONS = "@abi or @algod or @applications or @applications.verified or @assets or @auction or @c2c or @compile or @dryrun or @dryrun.testing or @indexer or @indexer.231 or @indexer.applications or @kmd or @rekey_v1 or @send.keyregtxn or @send or @compile.sourcemap" | ||
integration: | ||
behave --tags=$(INTEGRATIONS) tests -f progress2 | ||
behave --tags=$(INTEGRATION_TAGS) tests -f progress2 --no-capture | ||
|
||
display-all-python-steps: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. generates text used by the Unused Steps Analysis script |
||
find tests/steps -name "*.py" | xargs grep "behave" 2>/dev/null | cut -d: -f1 | sort | uniq | xargs awk "/@(given|step|then|when)/,/[)]/" | grep -E "(\".+\"|\'.+\')" | ||
|
||
harness: | ||
./test-harness.sh | ||
|
||
PYTHON_VERSION ?= 3.8 | ||
docker-test: | ||
PYTHON_VERSION='$(PYTHON_VERSION)' ./run_integration.sh | ||
docker-pysdk-build: | ||
docker build -t py-sdk-testing --build-arg PYTHON_VERSION="${PYTHON_VERSION}" . | ||
|
||
docker-pysdk-run: | ||
docker ps -a | ||
docker run -it --network host py-sdk-testing:latest | ||
|
||
docker-test: harness docker-pysdk-build docker-pysdk-run |
This file was deleted.
Oops, something went wrong.
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,61 @@ | ||
#!/usr/bin/env bash | ||
algochoi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
set -euo pipefail | ||
|
||
START=$(date "+%s") | ||
|
||
THIS=$(basename "$0") | ||
ENV_FILE=".test-env" | ||
TEST_DIR="tests" | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
@abi | ||
@algod | ||
@applications | ||
@applications.verified | ||
@assets | ||
@auction | ||
@c2c | ||
@compile | ||
@compile.sourcemap | ||
@dryrun | ||
@dryrun.testing | ||
@kmd | ||
@rekey_v1 | ||
@send | ||
@send.keyregtxn |
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:
tests/unit.tags
tests/integration.tags