-
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
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.
@tzaffi Excited to bring in these changes - appreciate the effort! ☕
Co-authored-by: Michael Diamant <michaeldiamant@users.noreply.github.com>
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.
oopsies
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 comment
The reason will be displayed to describe this comment to others. Learn more.
generates text used by the Unused Steps Analysis script
@@ -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: -))" |
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
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 #367 (comment) is addressed prior to merge.
Co-authored-by: Michael Diamant <michaeldiamant@users.noreply.github.com>
* add check to desc so we dont output null if undefined (#368) * Bumped version to v1.16.1 * Enhancement: Trim the indexer images and use the sandbox instead of custom dockers (#367) Co-authored-by: algochoi <86622919+algochoi@users.noreply.github.com> Co-authored-by: Michael Diamant <michaeldiamant@users.noreply.github.com> * Bug-fix: Pass verbosity through to testing harness (#373) * Enhancement: Add State Proof support (#370) * add stateproof support * Enhancement: Deprecating use of langspec (#371) * Bumped version to v1.17.0 * Update README.md Co-authored-by: Zeph Grunschlag <tzaffi@users.noreply.github.com> * Mergeback: Release v1.17.0b1 (#378) * Bumped version * Update README.md * bumped version to v1.17.0 Co-authored-by: Ben Guidarelli <ben.guidarelli@gmail.com> Co-authored-by: Barbara Poon <barbara.poon@algorand.com> Co-authored-by: Zeph Grunschlag <tzaffi@users.noreply.github.com> Co-authored-by: algochoi <86622919+algochoi@users.noreply.github.com> Co-authored-by: Michael Diamant <michaeldiamant@users.noreply.github.com> Co-authored-by: shiqizng <80276844+shiqizng@users.noreply.github.com> Co-authored-by: Jack Smith <jack.smith@algorand.com> Co-authored-by: Jack <87339414+algojack@users.noreply.github.com> Co-authored-by: Lucky Baar <lucky.baar@algorand.com>
Utilize New Sandbox-based testing SDK and Obsolete Steps
make docker-test
using pure-shell scripttest-harness.sh
that uses the sandbox instead of the old docker scriptsDefining Issue
algorand/algorand-sdk-testing#221
TODO
.test-env
should have the bare essentials needed to control this SDK's test setup and run. It should not overwrite SDK Testing's.env
. This is because the SDK Testing repo has the authority of what branches ofgo-algorand
,indexer
, etc. are relevant for a particular feature being tested.up.sh
as a github-actions based integrations test. CREATED: https://github.com/algorand/go-algorand-internal/issues/2235trim-indexer
branch ofalgorand-sdk-testing
been merged?algorand-sdk-testing/master
At a High Level
make docker-test
triggers the following:make harness
which calls./test-harness.sh
(replacingrun_integration.sh
):./test-harness/*
(renamed from/test
).test-env
to./test-harness/.env
(this is brand new)./tests/features/*
(same as previous)./test-harness/up.sh
which now does the following:.test-env
to interpolate a sandbox config template into a temporary file./test-harness/_config.harness
channel
v.source
sed
on mac os versus linux./test-harness/.sandbox/*
.test-env
(via its copy/test-harness/.env
) into./test-harness/.sandbox/.env
which serves as a Docker-compatible env file./test-harness/.sandbox/config.harness
./sandbox up -v harness
make docker-pysdk-build
: builds this repo'sDockerFile
into the imagepy-sdk-testing
make docker-pysdk-run
: executes thepy-sdk-testing
which runs all cucumber testsSummary of Changes
.test-env
is introduced to configure the test build and the cloned sandbox. During the build itStep Removals
Please refer to the step removal guide in the companion SDK Testing PR.
Additional Steps being modified due to indexer v1 removal
@rekey_v1
and@send
tags] -then("the transaction should go through")
assert "type" in context.acl.transaction_by_id(context.txn.get_txid())
because this relies on indexer v1@applications.verified
tag] -step("I wait for the transaction to be confirmed.")
assert "type" in context.acl.transaction_by_id(context.app_txid)
Additional Steps being removed due to Unused Steps Analysis
@when("we make a SearchForApplications call with {application_id} and {round}")
@when("we make a SearchForApplications call with {application_id} and {round}")
@then("Every transaction works with asset-id {assetid}")
@then('the parsed response should equal "{jsonfile}".')
@then('we expect the path used to be "{path}"')
@when("I create the payment transaction")
@when('I read a transaction "{txn}" from file "{num}"')
@when("I write the transaction to file")
@then("the transaction should still be the same")
@then("I do my part")
@given('key registration transaction parameters {fee} {fv} {lv} "{gh}" "{votekey}" "{selkey}" {votefst} {votelst} {votekd} "{gen}" "{note}"')
@when("I create the key registration transaction")
Statistics
Build time average case:
Running log of build times
:-(
...not sure if that's a blip or a new trendTesting
No functional changes are introduced in this PR. Therefore, the currently running tests are sufficient but should be tested locally in addition to CI.