Skip to content

Commit

Permalink
Fix the usage of version
Browse files Browse the repository at this point in the history
  • Loading branch information
tnasu committed Dec 21, 2022
1 parent a0043ca commit a4154f5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- release/**

env:
TAG: ostracon/e2e-node
TAG: ostracon/e2e-node:local-version # See test/e2e/Makefile:docker
CACHE_DIR: /tmp/ostracon/e2etest

jobs:
Expand Down
7 changes: 6 additions & 1 deletion test/e2e/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
all: docker generator runner

docker:
docker build --progress=plain --tag ostracon/e2e-node --tag ostracon/e2e-node:local-version -f docker/Dockerfile ../..
# See the default version on test/e2e/pkg/testnet.go:LoadTestnet
# Relate the "docker-compose.yml" on test/e2e/pkg/infra/docker/docker.go:dockerComposeBytes
# Relate the "cleanup" on test/e2e/runner/cleanup.go:cleanupDir
docker build --progress=plain \
--tag ostracon/e2e-node:local-version \
-f docker/Dockerfile ../..

# We need to build support for database backends into the app in
# order to build a binary with an Ostracon node in it (for built-in
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/runner/cleanup.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func Cleanup(testnet *e2e.Testnet) error {
if err != nil {
return err
}
err = cleanupDir(testnet.Dir)
err = cleanupDir(testnet.Dir, testnet.Nodes[0].Version)
if err != nil {
return err
}
Expand Down Expand Up @@ -48,7 +48,7 @@ func cleanupDocker() error {
}

// cleanupDir cleans up a testnet directory
func cleanupDir(dir string) error {
func cleanupDir(dir, version string) error {
if dir == "" {
return errors.New("no directory set")
}
Expand All @@ -70,7 +70,7 @@ func cleanupDir(dir string) error {
return err
}
err = execDocker("run", "--rm", "--entrypoint", "", "-v", fmt.Sprintf("%v:/network", absDir),
"ostracon/e2e-node", "sh", "-c", "rm -rf /network/*/")
fmt.Sprintf("ostracon/e2e-node:%s", version), "sh", "-c", "rm -rf /network/*/")
if err != nil {
return err
}
Expand Down

0 comments on commit a4154f5

Please sign in to comment.