From 30a86b035d588e282895fa14970c346d53cb16ea Mon Sep 17 00:00:00 2001 From: George Kudrayvtsev Date: Wed, 25 Oct 2023 13:24:36 -0700 Subject: [PATCH] Rename references in Makefile, use later Go version --- CHANGELOG.md | 27 +++++++++++++++------------ Dockerfile | 30 +++++++++++++++--------------- Makefile | 14 +++++++------- package.json | 1 - 4 files changed, 37 insertions(+), 35 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 40b6d3d..f20eb01 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # System Test Releases +#### Unreleased + +* js invocation upgraded to use [`stellar-sdk`](https://github.com/stellar/js-stellar-sdk) rather than the now-deprecated `soroban-client`. [system-test, #81](https://github.com/stellar/system-test/pull/81) + #### 1.0.19 * js verification of contract invoke results, compare as strings. [system-test, #68](https://github.com/stellar/system-test/pull/68) @@ -39,7 +43,7 @@ #### 1.0.9 -* Fix bug in NODEJS test invocation. [system-test, #46](https://github.com/stellar/system-test/pull/46) +* Fix bug in NODEJS test invocation. [system-test, #46](https://github.com/stellar/system-test/pull/46) #### 1.0.8 @@ -64,31 +68,31 @@ #### 1.0.5 -* Fixed `--TargetNetwork futurenet`, was incorrectly trying to configure artificial acceleration on core config also, which is only allowed on `standalone`. [system-test, #25](https://github.com/stellar/system-test/pull/25). +* Fixed `--TargetNetwork futurenet`, was incorrectly trying to configure artificial acceleration on core config also, which is only allowed on `standalone`. [system-test, #25](https://github.com/stellar/system-test/pull/25). -This version of tests is based on [Soroban Preview 7](https://soroban.stellar.org/docs/releases) system interfaces. +This version of tests is based on [Soroban Preview 7](https://soroban.stellar.org/docs/releases) system interfaces. #### 1.0.4 -* Fixed git ref resolution to detached head state when compiling soroban cli during image build [system-test, #23](https://github.com/stellar/system-test/pull/23), to build [Stellar Quickstart](https://github.com/stellar/quickstart). +* Fixed git ref resolution to detached head state when compiling soroban cli during image build [system-test, #23](https://github.com/stellar/system-test/pull/23), to build [Stellar Quickstart](https://github.com/stellar/quickstart). -This version of tests is based on [Soroban Preview 7](https://soroban.stellar.org/docs/releases) system interfaces. +This version of tests is based on [Soroban Preview 7](https://soroban.stellar.org/docs/releases) system interfaces. #### 1.0.3 -* Modified test framework, [system-test, #21](https://github.com/stellar/system-test/pull/21), to build [Stellar Quickstart](https://github.com/stellar/quickstart) as the base image. -Refer to [README.md](https://github.com/stellar/system-test#readme) for new two step process of running tests: -(1) run make with server versions, creates docker image -(2) run the docker image to run tests. +* Modified test framework, [system-test, #21](https://github.com/stellar/system-test/pull/21), to build [Stellar Quickstart](https://github.com/stellar/quickstart) as the base image. +Refer to [README.md](https://github.com/stellar/system-test#readme) for new two step process of running tests: +(1) run make with server versions, creates docker image +(2) run the docker image to run tests. -This version of tests is based on [Soroban Preview 7](https://soroban.stellar.org/docs/releases) system interfaces. +This version of tests is based on [Soroban Preview 7](https://soroban.stellar.org/docs/releases) system interfaces. #### 1.0.2 * Modified tests to follow the new dynamic args format on cli [soroban-tools, #307](https://github.com/stellar/soroban-tools/pull/307) -This version of tests is based on [Soroban Preview 6](https://soroban.stellar.org/docs/releases#preview-6-january-9th-2023) system interfaces, combined with the additional change applied on top of dynamic args in cli `contract invoke` +This version of tests is based on [Soroban Preview 6](https://soroban.stellar.org/docs/releases#preview-6-january-9th-2023) system interfaces, combined with the additional change applied on top of dynamic args in cli `contract invoke` #### 1.0.1 @@ -105,4 +109,3 @@ First release of packaged system tests. Initial focus is on Soroban e2e cases us * DApp developer compiles, deploys and invokes a contract This version of tests execute the [Soroban Preview 5](https://soroban.stellar.org/docs/releases#preview-5-december-8th-2022) system interfaces only. - diff --git a/Dockerfile b/Dockerfile index 3bca29a..a455ee2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,10 @@ ARG QUICKSTART_IMAGE_REF=stellar/quickstart:soroban-dev ARG SOROBAN_CLI_IMAGE_REF=stellar/system-test-soroban-cli:dev -FROM golang:1.20 as go +FROM golang:1.21 as go -RUN ["mkdir", "-p", "/test"] -RUN ["mkdir", "-p", "/test/bin"] +RUN ["mkdir", "-p", "/test"] +RUN ["mkdir", "-p", "/test/bin"] WORKDIR /test ADD go.mod go.sum ./ @@ -13,7 +13,7 @@ ADD e2e.go ./ ADD features ./features # build each feature folder with go test module. -# compiles each feature to a binary to be executed, +# compiles each feature to a binary to be executed, # and copies the .feature file with it for runtime. RUN go test -c -o ./bin/dapp_develop_test.bin ./features/dapp_develop/... ADD features/dapp_develop/dapp_develop.feature ./bin @@ -30,7 +30,7 @@ ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y build-essential expect git && apt-get clean # Install Rust -RUN ["mkdir", "-p", "/rust"] +RUN ["mkdir", "-p", "/rust"] ENV CARGO_HOME=/rust/.cargo ENV RUSTUP_HOME=/rust/.rust ENV RUST_TOOLCHAIN_VERSION=$RUST_TOOLCHAIN_VERSION @@ -64,20 +64,20 @@ RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION} ENV PATH="/home/tester/.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}" RUN npm install -g ts-node yarn -# Install js-soroban-client -ARG JS_SOROBAN_CLIENT_NPM_VERSION +# Install js-stellar-sdk +ARG JS_STELLAR_SDK_NPM_VERSION ADD package.json /home/tester/ -ADD js-soroban-client /home/tester/js-soroban-client +ADD js-stellar-sdk /home/tester/js-stellar-sdk RUN sudo chown -R tester:tester /home/tester RUN yarn install --network-concurrency 1 -RUN if echo "$JS_SOROBAN_CLIENT_NPM_VERSION" | grep -q '.*file:.*'; then \ - cd /home/tester/js-soroban-client; \ - yarn cache clean; \ - yarn install --network-concurrency 1; \ - cd /home/tester; \ - yarn add ${JS_SOROBAN_CLIENT_NPM_VERSION} --network-concurrency 1; \ +RUN if echo "$JS_STELLAR_SDK_NPM_VERSION" | grep -q '.*file:.*'; then \ + cd /home/tester/js-stellar-sdk; \ + yarn cache clean; \ + yarn install --network-concurrency 1; \ + cd /home/tester; \ + yarn add ${JS_STELLAR_SDK_NPM_VERSION} --network-concurrency 1; \ else \ - yarn add "soroban-client@${JS_SOROBAN_CLIENT_NPM_VERSION}" --network-concurrency 1; \ + yarn add "stellar-sdk@${JS_STELLAR_SDK_NPM_VERSION}" --network-concurrency 1; \ fi ADD *.ts /home/tester/bin/ diff --git a/Makefile b/Makefile index 9f7a0fc..14fd388 100644 --- a/Makefile +++ b/Makefile @@ -22,10 +22,10 @@ SOROBAN_CLI_GIT_REF=https://github.com/stellar/soroban-tools.git\#main GO_GIT_REF=https://github.com/stellar/go.git\#master QUICKSTART_GIT_REF=https://github.com/stellar/quickstart.git\#master # specify the published npm repo version of soroban-client js library, or you can specify gh git ref url as the version also -JS_SOROBAN_CLIENT_NPM_VERSION=https://github.com/stellar/js-soroban-client.git\#main +JS_STELLAR_SDK_NPM_VERSION=https://github.com/stellar/js-stellar-sdk.git\#main # variables to set if wanting to use existing dockerhub images instead of compiling -# image during build. if using this option, the image ref should provide a version for same +# image during build. if using this option, the image ref should provide a version for same # platform arch as the build host is on, i.e. linux/amd64 or linux/arm64. # # image must have soroban cli bin at /usr/local/cargo/bin/soroban @@ -43,7 +43,7 @@ FRIENDBOT_IMAGE= # image must have core bin at /usr/local/bin/stellar-core CORE_IMAGE= # -# a prebuilt 'soroban-dev' image from the quickstart repo, if this is supplied, +# a prebuilt 'soroban-dev' image from the quickstart repo, if this is supplied, # the other core, rpc, horizon, friendbot config settings are mostly ignored, since the quickstart image # has them compiled in already. the 'stellar/quickstart' images also support multi-arch, so the build will # work those images whether the build host is arm64 or amd64. @@ -54,7 +54,7 @@ NODE_VERSION?=16.20.2 # if crate version is set, then it overrides SOROBAN_CLI_GIT_REF, cli will be installed from this create instead SOROBAN_CLI_CRATE_VERSION= -# sets the rustc version in the system test image +# sets the rustc version in the system test image RUST_TOOLCHAIN_VERSION=stable # temporarily needed, builds core with soroban enabled features @@ -73,7 +73,7 @@ build-friendbot: docker build -t "$(FRIENDBOT_STAGE_IMAGE)" \ --build-arg BUILDKIT_CONTEXT_KEEP_GIT_DIR=true \ -f services/friendbot/docker/Dockerfile "$$SOURCE_URL"; \ - fi + fi build-soroban-rpc: if [ -z "$(QUICKSTART_IMAGE)" ] && [ -z "$(SOROBAN_RPC_IMAGE)" ]; then \ @@ -109,7 +109,7 @@ build-horizon: --target builder -f services/horizon/docker/Dockerfile.dev "$$SOURCE_URL"; \ fi -build-core: +build-core: if [ -z "$(QUICKSTART_IMAGE)" ] && [ -z "$(CORE_IMAGE)" ]; then \ SOURCE_URL="$(CORE_GIT_REF)"; \ if [[ ! "$(CORE_GIT_REF)" =~ \.git ]]; then \ @@ -152,5 +152,5 @@ build: build-quickstart build-soroban-cli --build-arg SOROBAN_CLI_IMAGE_REF=$$SOROBAN_CLI_IMAGE_REF \ --build-arg RUST_TOOLCHAIN_VERSION=$(RUST_TOOLCHAIN_VERSION) \ --build-arg NODE_VERSION=$(NODE_VERSION) \ - --build-arg JS_SOROBAN_CLIENT_NPM_VERSION=$(JS_SOROBAN_CLIENT_NPM_VERSION) \ + --build-arg JS_STELLAR_SDK_VERSION=$(JS_STELLAR_SDK_VERSION) \ --label org.opencontainers.image.revision="$(SYSTEM_TEST_SHA)" .; diff --git a/package.json b/package.json index 5018b0a..855f94c 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,6 @@ }, "dependencies": { "argparse": "^2.0.1", - "stellar-sdk": "^11.0.0-beta.4", "tslib": "^2.5.0", "typescript": "^4.9.5" },