Skip to content

Commit 2e9ee3e

Browse files
smickovskidarchseer
authored andcommitted
Expose testcontainer.Container so code can clean up it's containers
1 parent 820e306 commit 2e9ee3e

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

framework/components/blockchain/blockchain.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package blockchain
22

33
import (
44
"fmt"
5+
"github.com/testcontainers/testcontainers-go"
56
)
67

78
// Input is a blockchain network configuration params
@@ -29,11 +30,12 @@ type Input struct {
2930

3031
// Output is a blockchain network output, ChainID and one or more nodes that forms the network
3132
type Output struct {
32-
UseCache bool `toml:"use_cache"`
33-
Family string `toml:"family"`
34-
ContainerName string `toml:"container_name"`
35-
ChainID string `toml:"chain_id"`
36-
Nodes []*Node `toml:"nodes"`
33+
UseCache bool `toml:"use_cache"`
34+
Family string `toml:"family"`
35+
ContainerName string `toml:"container_name"`
36+
Container testcontainers.Container `toml:"-"`
37+
ChainID string `toml:"chain_id"`
38+
Nodes []*Node `toml:"nodes"`
3739
}
3840

3941
// Node represents blockchain node output, URLs required for connection locally and inside docker network

framework/components/blockchain/solana.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ func newSolana(in *Input) (*Output, error) {
143143
UseCache: true,
144144
Family: "solana",
145145
ContainerName: containerName,
146+
Container: c,
146147
Nodes: []*Node{
147148
{
148149
HostWSUrl: fmt.Sprintf("ws://%s:%s", host, in.WSPort),

0 commit comments

Comments
 (0)