Skip to content

Commit

Permalink
e2e: set algod version and default values (#1560)
Browse files Browse the repository at this point in the history
* config algod channel and set default test env values

---------

Co-authored-by: Will Winder <[email protected]>
  • Loading branch information
shiqizng and winder authored Jul 26, 2023
1 parent 4526a62 commit efe92f5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 15 deletions.
13 changes: 8 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,18 @@ jobs:
go_version:
type: string
environment:
# A stable environment for PRs.
# Set CHANNEL to nightly and update CI_E2E_FILENAME when adding a new feature.
# Change back to stable once the new feature is released.
CI_E2E_FILENAME: "f99e7b0c/rel-nightly"
CHANNEL: nightly
steps:
- go/install:
version: << parameters.go_version >>
- install_dependencies
- install_linter
- run_tests
# Change this to run_e2e_tests once we have stable algod binaries containing delta APIs
- run_e2e_tests_nightly
- run_e2e_tests
- codecov/upload

test_nightly:
Expand All @@ -65,6 +68,7 @@ jobs:
type: string
environment:
CI_E2E_FILENAME: "rel-nightly"
CHANNEL: nightly
steps:
- go/install:
version: << parameters.go_version >>
Expand Down Expand Up @@ -134,7 +138,6 @@ commands:
command: go install github.com/golangci/golangci-lint/cmd/[email protected]

run_e2e_tests:
# no "-nightly" in final 2 steps
steps:
- run:
name: Install go-algorand stable binaries
Expand All @@ -154,8 +157,8 @@ commands:
wget https://raw.githubusercontent.com/algorand/go-algorand/rel/stable/cmd/updater/update.sh && chmod 744 update.sh
./update.sh -i -c nightly -n -d ./ -p /usr/local/go/bin
export GOPATH=/usr/local/go/
- run: make e2e-nightly
- run: make e2e-filter-test-nightly
- run: make e2e
- run: make e2e-filter-test

run_tests:
steps:
Expand Down
8 changes: 0 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ lint:
fmt:
go fmt ./...

# note: when running e2e tests manually be sure to set the e2e filename:
# 'export CI_E2E_FILENAME=rel-nightly'
# To keep the container running at exit set 'export EXTRA="--keep-alive"',
# once the container is paused use 'docker exec <id> bash' to inspect temp
# files in `/tmp/*/'
Expand All @@ -58,12 +56,6 @@ e2e: cmd/algorand-indexer/algorand-indexer
e2e-filter-test: cmd/algorand-indexer/algorand-indexer
cd e2e_tests/docker/indexer-filtered/ && docker-compose build --build-arg GO_IMAGE=${GO_IMAGE} && docker-compose up --exit-code-from e2e-read

e2e-filter-test-nightly: cmd/algorand-indexer/algorand-indexer
cd e2e_tests/docker/indexer-filtered/ && docker-compose build --build-arg GO_IMAGE=${GO_IMAGE} --build-arg CHANNEL=nightly && docker-compose up --exit-code-from e2e-read

e2e-nightly: cmd/algorand-indexer/algorand-indexer
cd e2e_tests/docker/indexer/ && docker-compose build --build-arg GO_IMAGE=${GO_IMAGE} --build-arg CHANNEL=nightly && docker-compose up --exit-code-from e2e

deploy:
mule/deploy.sh

Expand Down
2 changes: 1 addition & 1 deletion e2e_tests/docker/indexer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG GO_IMAGE=golang:1.14.7
ARG GO_IMAGE=golang:1.20.5
FROM $GO_IMAGE
ARG CHANNEL=stable

Expand Down
4 changes: 3 additions & 1 deletion e2e_tests/docker/indexer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ services:
build:
context: ../../../.
dockerfile: ./e2e_tests/docker/indexer/Dockerfile
args:
CHANNEL: "${CHANNEL:-stable}"
environment:
CONNECTION_STRING: "host=e2e-db port=5432 user=algorand password=algorand dbname=indexer_db sslmode=disable"
CI_E2E_FILENAME: "${CI_E2E_FILENAME}"
CI_E2E_FILENAME: "${CI_E2E_FILENAME:-rel-nightly}"
# Add --keep-alive to this variable to pause the container on an error
EXTRA: "${EXTRA}"

Expand Down

0 comments on commit efe92f5

Please sign in to comment.