Enhancement: Use Sandbox for Testing#360
Conversation
algochoi
left a comment
There was a problem hiding this comment.
Nice, LGTM - one comment about error handling
| @c2c | ||
| @compile | ||
| @compile.sourcemap | ||
| @dryrun |
There was a problem hiding this comment.
deleted tags:
@indexer
@indexer.231
@indexer.applications
| @@ -0,0 +1,26 @@ | |||
| @unit.abijson | |||
There was a problem hiding this comment.
should be the same tags
michaeldiamant
left a comment
There was a problem hiding this comment.
@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 |
| 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.
Cucumber tags now reside in:
test/unit.tagstest/integration.tags
| 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.
Command that generates text used by Unused Steps Analysis script
michaeldiamant
left a comment
There was a problem hiding this comment.
Approval assumes #360 (comment) is addressed prior to merge.
Co-authored-by: Michael Diamant <michaeldiamant@users.noreply.github.com>
Co-authored-by: Michael Diamant <michaeldiamant@users.noreply.github.com>
* 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 <michaeldiamant@users.noreply.github.com> * Bug-Fix: passthru verbosity (#371) * Enhancement: Deprecating use of langspec (#366) Co-authored-by: Michael Diamant <michaeldiamant@users.noreply.github.com> * 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 <wwinder.unh@gmail.com> * 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 <wwinder.unh@gmail.com> Co-authored-by: Eric Warehime <eric.warehime@gmail.com> * 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 <87339414+algojack@users.noreply.github.com> Co-authored-by: Ben Guidarelli <ben.guidarelli@gmail.com> Co-authored-by: Jack Smith <jack.smith@algorand.com> Co-authored-by: Michael Diamant <michaeldiamant@users.noreply.github.com> Co-authored-by: algochoi <86622919+algochoi@users.noreply.github.com> Co-authored-by: Jason Paulos <jasonpaulos@users.noreply.github.com> Co-authored-by: Barbara Poon <barbara.poon@algorand.com> Co-authored-by: Zeph Grunschlag <tzaffi@users.noreply.github.com> Co-authored-by: Eric Warehime <eric.warehime@gmail.com> Co-authored-by: Will Winder <wwinder.unh@gmail.com> Co-authored-by: Almog Tal <107349997+almog-t@users.noreply.github.com>
+= 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-indexerbranch ofalgorand-sdk-testingbeen merged?algorand-sdk-testing/masterSummary 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.shand 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.shandsdk.pyhelpers.go- removing functions no longer used after step deletionindexer_integration_test.go- removed as only used byindexer.featuresteps_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