Skip to content

Commit

Permalink
faucet container included
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmenendez committed Sep 6, 2024
1 parent 7e1a7c0 commit bcfd31e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
13 changes: 7 additions & 6 deletions api/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,13 @@ func TestMain(m *testing.M) {
if err != nil {
panic(err)
}
// start the faucet and voconed containers
// faucetContainer, err := test.StartVocfaucetContainer(ctx)
// if err != nil {
// panic(err)
// }
// defer func() { _ = faucetContainer.Terminate(ctx) }()
// start the faucet container
faucetContainer, err := test.StartVocfaucetContainer(ctx)
if err != nil {
panic(err)
}
defer func() { _ = faucetContainer.Terminate(ctx) }()
// start the voconed container
apiContainer, err := test.StartVoconedContainer(ctx)
if err != nil {
panic(err)
Expand Down
15 changes: 6 additions & 9 deletions test/voconed.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ func StartVoconedContainer(ctx context.Context) (testcontainers.Container, error
Cmd: voconedCmd,
ImagePlatform: "linux/amd64",
ExposedPorts: []string{exposedPort},
WaitingFor: wait.ForAll(
wait.ForListeningPort(nat.Port(exposedPort)),
),
WaitingFor: wait.ForListeningPort(nat.Port(exposedPort)),
},
Started: true,
})
Expand All @@ -75,12 +73,11 @@ func StartVocfaucetContainer(ctx context.Context) (testcontainers.Container, err
return testcontainers.GenericContainer(ctx,
testcontainers.GenericContainerRequest{
ContainerRequest: testcontainers.ContainerRequest{
Image: "ghcr.io/vocdoni/vocfaucet:main",
Cmd: vocfaucetCmd,
ExposedPorts: []string{exposedPort},
WaitingFor: wait.ForAll(
wait.ForListeningPort(nat.Port(exposedPort)),
),
Image: "ghcr.io/vocdoni/vocfaucet:main",
Cmd: vocfaucetCmd,
ImagePlatform: "linux/amd64",
ExposedPorts: []string{exposedPort},
WaitingFor: wait.ForListeningPort(nat.Port(exposedPort)),
},
Started: true,
})
Expand Down

0 comments on commit bcfd31e

Please sign in to comment.