Skip to content

Commit 9930660

Browse files
authored
TON: return container in the blockchain output (#1964)
* feat: return container from ton bc * chore: add changeset
1 parent 1239aee commit 9930660

File tree

4 files changed

+6
-0
lines changed

4 files changed

+6
-0
lines changed

book/src/framework/components/blockchains/ton.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ func TestTonSmoke(t *testing.T) {
4848

4949
bc, err := blockchain.NewBlockchainNetwork(in.BlockchainA)
5050
require.NoError(t, err)
51+
// we can also explicitly terminate the container after the test
52+
defer bc.Container.Terminate(t.Context())
5153

5254
var client ton.APIClientWrapped
5355

framework/.changeset/v0.10.2.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Adds Container field in the TON blockchain output

framework/components/blockchain/ton.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ func newTon(in *Input) (*Output, error) {
123123
Type: in.Type,
124124
Family: FamilyTon,
125125
ContainerName: name,
126+
Container: c,
126127
Nodes: []*Node{{
127128
// Note: define if we need more access other than the global config(tonutils-go only uses liteclients defined in the config)
128129
ExternalHTTPUrl: fmt.Sprintf("%s:%s", "localhost", ports.SimpleServer),

framework/examples/myproject/smoke_ton_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ func TestTonSmoke(t *testing.T) {
2424

2525
bc, err := blockchain.NewBlockchainNetwork(in.BlockchainA)
2626
require.NoError(t, err)
27+
// we can also explicitly terminate the container after the test
28+
defer bc.Container.Terminate(t.Context())
2729

2830
var client ton.APIClientWrapped
2931
t.Run("setup:connect", func(t *testing.T) {

0 commit comments

Comments
 (0)