Skip to content

Commit

Permalink
chore(test): make thor version configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenvechain committed Dec 17, 2024
1 parent 9f6264c commit 3c7be7d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions test/helpers/compose/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ services:
container_name: rosetta
build:
context: ../../..
args:
- THOR_VERSION=${THOR_VERSION:-v2.1.4}
ports:
- "8080:8080"
- "8669:8669"
Expand Down
11 changes: 9 additions & 2 deletions test/helpers/compose/testContainer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,15 @@ const composeFilePath = path.join(__dirname);
const composeFile = "docker-compose.yaml";

export function dockerCompose(): Promise<StartedDockerComposeEnvironment> {
return new DockerComposeEnvironment(composeFilePath, composeFile)
const compose = new DockerComposeEnvironment(composeFilePath, composeFile)
.withWaitStrategy("rosetta", Wait.forLogMessage("http://localhost:8669"))
.withBuild()
.up();

if (process.env["THOR_VERSION"]){
compose.withEnvironment({
THOR_VERSION: process.env["THOR_VERSION"]
})
}

return compose.up();
}

0 comments on commit 3c7be7d

Please sign in to comment.