-
Notifications
You must be signed in to change notification settings - Fork 98
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
Conversation
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.
Nice, LGTM - one comment about error handling
@c2c | ||
@compile | ||
@compile.sourcemap | ||
@dryrun |
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.
deleted tags:
@indexer
@indexer.231
@indexer.applications
@@ -0,0 +1,26 @@ | |||
@unit.abijson |
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.
should be the same tags
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.
@tzaffi Nice work here - Thanks for the extra cycles to minimize error when dealing with Cucumber tag configuration.
Aside: I like the spirit of REMOVE_LOCAL_FEATURES
- it supports faster local iteration. Though I'm slightly concerned it will lead to difficult to debug states.
- Overall, I think it's worth trialing.
- In a future iteration, if we think it's worth pursuing, a possible alternative I'm imagining is to supply configuration analogous to sandbox's
TYPE="CHANNEL"
/TYPE="SOURCE"
to conditionally choose the algorand-sdk-testing source. The intent being to find an algorand-sdk-testing installation on the local filesystem.
I introduced |
@@ -1,6 +1,9 @@ | |||
SRCPATH := $(shell pwd) | |||
TEST_SOURCES := $(shell cd $(SRCPATH) && go list ./...) | |||
TEST_SOURCES_NO_CUCUMBER := $(shell cd $(SRCPATH) && go list ./... | grep -v test) | |||
UNIT_TAGS := "$(shell awk '{print $2}' test/unit.tags | paste -s -d, -)" | |||
INTEGRATIONS_TAGS := "$(shell awk '{print $2}' test/integration.tags | paste -s -d, -)" |
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
Makefile
Outdated
cd test && go test -timeout 0s --godog.strict=true --godog.format=pretty --godog.tags=$(INTEGRATIONS_TAGS) --test.v . | ||
|
||
display-all-go-steps: | ||
find test -name "*.go" | xargs grep "github.com/cucumber/godog" 2>/dev/null | cut -d: -f1 | sort | uniq | xargs grep -Eo "Step[(].[^\`]+" | awk '{sub(/:Step\(./,":")} 1' | sed -E 's/", [a-zA-Z0-9]+\)//g' #| grep "with path" |
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.
Command that generates text used by Unused Steps Analysis script
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.
Approval assumes #360 (comment) is addressed prior to merge.
Co-authored-by: Michael Diamant <[email protected]>
Co-authored-by: Michael Diamant <[email protected]>
* Github-Actions: Adding pr title and label checks (#336) * Dev Tools: Source map decoder (#335) * Updated CHANGELOG.md * AVM: Consolidate TEAL and AVM versions (#345) * Testing: Use Dev mode network for cucumber tests (#349) * AVM: Use avm-abi repo (#352) * Updated CHANGELOG.md * Enhancement: Use Sandbox for Testing (#360) Co-authored-by: Michael Diamant <[email protected]> * Bug-Fix: passthru verbosity (#371) * Enhancement: Deprecating use of langspec (#366) Co-authored-by: Michael Diamant <[email protected]> * StateProof: State proof support (#374) * Regenerate client. * Update txn and block objects, cucumber tests passing. * Enable cucumber tests. * Update types/stateproof.go * Add transactions-root-256 * Remove unused code. * Remove unused file * Add txn commitments blockheader fields * Rename signature, add allocbound definitions * Add txn commitment to header * PR comments * Remove unused file Co-authored-by: Will Winder <[email protected]> * State Proofs: Use generic type for StateProof txn field. (#378) * Use generic type for StateProof txn field. * Add missing type. * Remove GenericDigest. * fix type assertion on source map version (#370) * let the json package figure out how to decode the elements of the incoming map (#380) * StateProof: State Proof Verification additions (#377) * Regenerate client. * Remove unused file * moved files from stateproof verification repo * now using updated go-stateproof-verification * fixed go mod * moved consts near their usage * added working state proof verifier test * added unit test and resources * now using go 1.15 supported function * changes to avoid dependency of stateproof verification on SDK * added needed types to stateproof.go for message hashing * reverted packages, now using up to date go-stateproof-verification * CR: renamed verification functions * hashing sp message is now in crypto * removed hashing of light block header * CR: now allocating space upfront in hashing state proof message * attempting to use embedded files * CR: using GenericDigest in block.go * CR: Renamed package to match directory * Removed go 1.15 from CI * improved embed usage * CR: removed stateproof verification logic * tidied go mod file Co-authored-by: Will Winder <[email protected]> Co-authored-by: Eric Warehime <[email protected]> * State Proofs: added compute leaf function for light block header to sdk (#382) * added compute leaf function for light block header to sdk * renamed blockheader256 * changed passed type to pointer * reverted back to copying * renamed light block header hash func (#383) * Enable stpf cucumber unit tests (#386) Co-authored-by: Jack <[email protected]> Co-authored-by: Ben Guidarelli <[email protected]> Co-authored-by: Jack Smith <[email protected]> Co-authored-by: Michael Diamant <[email protected]> Co-authored-by: algochoi <[email protected]> Co-authored-by: Jason Paulos <[email protected]> Co-authored-by: Barbara Poon <[email protected]> Co-authored-by: Zeph Grunschlag <[email protected]> Co-authored-by: Eric Warehime <[email protected]> Co-authored-by: Will Winder <[email protected]> Co-authored-by: Almog Tal <[email protected]>
+= Sandbox -= Indexer Snapshots
Undertaking the work of removing obsolete indexer steps and testing using the Sandbox.
Defining Issue
algorand/algorand-sdk-testing#221
TODO
trim-indexer
branch ofalgorand-sdk-testing
been merged?algorand-sdk-testing/master
Summary of Changes
.test-env
- new test-only environment fileMakefile
- more fine grained control over the test process in line with other SDK'stest-harness.sh
- replacestest/docker/run_docker.sh
and is in line with the new approach of other SDK'stest/
:applications_integration_test.go
- step removalapplications_unit_test.go
- removal of unused helperdocker/
removerun_docker.sh
andsdk.py
helpers.go
- removing functions no longer used after step deletionindexer_integration_test.go
- removed as only used byindexer.feature
steps_test.go
- step removaltransactions_test.go
- step removalStep Removals
Please refer to the step removal guide in the companion SDK Testing PR.
Additional Steps being removed following Unused Steps Analysis script
See this google sheet
s.Step('^we make a Search For Transactions call with account "([^"]*)" NotePrefix "([^"]*)" TxType "([^"]*)" SigType "([^"]*)" txid "([^"]*)" round (\d+) minRound (\d+) maxRound (\d+) limit (\d+) beforeTime (\d+) afterTime (\d+) currencyGreaterThan (\d+) currencyLessThan (\d+) assetIndex (\d+) addressRole "([^"]*)" ExcluseCloseTo "([^"]*)"$' ...)
s.Step('^the parsed Pending Transactions Information response should have sender "([^"]*)"$' ...)
s.Step('^we make a Pending Transaction Information against txid "([^"]*)" with max (\d+)$' ...)
s.Step('^we make a Pending Transactions By Address call against account "([^"]*)" and max (\d+)$' ...)
s.Step('^we make a Get Block call against block number (\d+)$' ...)
s.Step('^we make a SearchForAssets call with limit (\d+) creator "([^"]*)" name "([^"]*)" unit "([^"]*)" index (\d+) and afterAsset (\d+)$' ...)
s.Step("I create the payment transaction" ...)
s.Step('I read a transaction "([^"]*)" from file "([^"]*)"' ...)
s.Step("I write the transaction to file" ...)
s.Step("the transaction should still be the same" ...)
s.Step("I do my part" ...)
s.Step('key registration transaction parameters (\d+) (\d+) (\d+) "([^"]*)" "([^"]*)" "([^"]*)" (\d+) (\d+) (\d+) "([^"]*)" "' ...)
s.Step("I create the key registration transaction", ...)
Timing Stats