Skip to content

Poc: refactor to pure tests, no build or embed of quickstart image #92

@sreuland

Description

@sreuland

What problem does your feature solve?

The system test image embeds the quickstart image as the base and therefore it first builds the quickstart image from a source tag locally for configured target component versions for a local network(core, rpc) which takes time and results in a final system-test docker image which bundles the compiled tests with the entire quickstart base image. This approach was originally done to avoid re-implementing the build, config and execution of a 'local' stellar network as target network for test purposes. But it has a heavy coupling on quickstart, and requires rebuilding quickstart which has core, rpc inside it as part of building system-test's docker image.

The tests themselves are written in pure go and cucumber and can be compiled to a binary on a more more slim docker image which additionally carries(installs) the client binaries such as node/web js, stellar-cli, etc. which are invoked by the tests against the remote target network.

What would you like to see?

Remove embedded quickstart from the system-test image and instead make the current image run parameters for remote target settings mandatory rather than optional:

TargetNetworkPassPhrase="Standalone Network ; February 2017"
TargetNetworkSecretKey="SC5O7VZUXDJ6JBDSZ74DSERXL7W3Y5LTOAMRF7RQRL3TAGAPS7LUVG3L"
TargetNetworkPublicKey="GBZXN7PIRZGNMHGA7MUUUF4GWPY5AYPV6LY4UV2GL6VJGIQRXFDNMADI"
TargetNetworkRPCURL=http://localhost:8000/rpc

this means can remove the quickstart build step from makefile and the settings related to quickstart and rpc versions:

QUICKSTART_GIT_REF
CORE_GIT_REF
CORE_COMPILE_CONFIGURE_FLAGS
STELLAR_RPC_GIT_REF

The test orchestrator decides what target network will provide the combination of versions of core and rpc which need to be verified. They may be able to run tests against an existing deployment which has the versions desired already running. if not, then orchestrator needs to build and use a 'local' network by building quickstart with the version combination of rpc and core they want to verify.

To illustrate the net change the orchestrator first builds a local quickstart image by checking out the quickstart repo and then specifying the versions they want on the build:

XDR_REF=v20.1.0 \
CORE_REF=v20.2.0rc3 \
STELLAR_RPC_REF=v22.1.2 \

The orchestrator checks out system-test repo and builds the system-test image for the client versions they want to invoke against the target network:

make \
    SOROBAN_CLI_GIT_REF=https://github.com/stellar/soroban-cli.git\#main \
    RUST_TOOLCHAIN_VERSION=stable \
    RS_XDR_GIT_REF=v20.0.2 \
    JS_STELLAR_SDK_NPM_VERSION=11.3.0 \
    NODE_VERSION?=18.19.0 \
    build

Run the quickstart image to bring up the 'local' network.

docker run --rm -it -p "8000:8000" --name stellar stellar/quickstart:dev --local

Runs the tests against the 'local' network. This includes the version of soroban-examples for contract code which tests compile and deploy:

docker run --rm -t --name e2e_test stellar/system-test:dev \
--platform linux/amd64 \
--VerboseOutput true \
--TargetNetworkRPCURL http://localhost:8000/rpc \
--TargetNetworkPassphrase "Standalone Network ; February 2017" \
--TargetNetworkTestAccountSecret SC5O7VZUXDJ6JBDSZ74DSERXL7W3Y5LTOAMRF7RQRL3TAGAPS7LUVG3L \
--TargetNetworkTestAccountPublic GBZXN7PIRZGNMHGA7MUUUF4GWPY5AYPV6LY4UV2GL6VJGIQRXFDNMADI \
--SorobanExamplesGitHash v20.0.0

What alternatives are there?

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions