Skip to content

Commit f24b834

Browse files
committed
chore: testing nodeset
1 parent a121ef7 commit f24b834

File tree

2 files changed

+57
-11
lines changed

2 files changed

+57
-11
lines changed
Lines changed: 41 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,42 @@
11
[blockchain_a]
2-
type = "ton"
3-
docker_compose_file_url = "https://raw.githubusercontent.com/neodix42/mylocalton-docker/main/docker-compose.yaml"
4-
ton_core_services = [
5-
"genesis",
6-
"tonhttpapi",
7-
"event-cache",
8-
"index-postgres",
9-
"index-worker",
10-
"index-api",
11-
]
2+
type = "ton"
3+
docker_compose_file_url = "https://raw.githubusercontent.com/neodix42/mylocalton-docker/main/docker-compose.yaml"
4+
ton_core_services = [
5+
"genesis",
6+
"tonhttpapi",
7+
"event-cache",
8+
"index-postgres",
9+
"index-worker",
10+
"index-api",
11+
]
12+
13+
[data_provider]
14+
port = 9111
15+
16+
[[nodesets]]
17+
name = "don"
18+
nodes = 5
19+
override_mode = "each"
20+
21+
[nodesets.db]
22+
image = "postgres:12.0"
23+
24+
[[nodesets.node_specs]]
25+
[nodesets.node_specs.node]
26+
image = "public.ecr.aws/chainlink/chainlink:v2.17.0"
27+
28+
[[nodesets.node_specs]]
29+
[nodesets.node_specs.node]
30+
image = "public.ecr.aws/chainlink/chainlink:v2.17.0"
31+
32+
[[nodesets.node_specs]]
33+
[nodesets.node_specs.node]
34+
image = "public.ecr.aws/chainlink/chainlink:v2.17.0"
35+
36+
[[nodesets.node_specs]]
37+
[nodesets.node_specs.node]
38+
image = "public.ecr.aws/chainlink/chainlink:v2.17.0"
39+
40+
[[nodesets.node_specs]]
41+
[nodesets.node_specs.node]
42+
image = "public.ecr.aws/chainlink/chainlink:v2.17.0"

framework/examples/myproject/smoke_ton_test.go

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,14 @@ import (
1212

1313
"github.com/smartcontractkit/chainlink-testing-framework/framework"
1414
"github.com/smartcontractkit/chainlink-testing-framework/framework/components/blockchain"
15+
"github.com/smartcontractkit/chainlink-testing-framework/framework/components/fake"
16+
ns "github.com/smartcontractkit/chainlink-testing-framework/framework/components/simple_node_set"
1517
)
1618

1719
type CfgTon struct {
18-
BlockchainA *blockchain.Input `toml:"blockchain_a" validate:"required"`
20+
BlockchainA *blockchain.Input `toml:"blockchain_a" validate:"required"`
21+
MockerDataProvider *fake.Input `toml:"data_provider" validate:"required"`
22+
NodeSets []*ns.Input `toml:"nodesets" validate:"required"`
1923
}
2024

2125
func TestTonSmoke(t *testing.T) {
@@ -25,6 +29,17 @@ func TestTonSmoke(t *testing.T) {
2529
bc, err := blockchain.NewBlockchainNetwork(in.BlockchainA)
2630
require.NoError(t, err)
2731

32+
_, err = fake.NewFakeDataProvider(in.MockerDataProvider)
33+
require.NoError(t, err)
34+
out, err := ns.NewSharedDBNodeSet(in.NodeSets[0], bc)
35+
require.NoError(t, err)
36+
37+
t.Run("test something", func(t *testing.T) {
38+
for _, n := range out.CLNodes {
39+
require.NotEmpty(t, n.Node.ExternalURL)
40+
}
41+
})
42+
2843
var client ton.APIClientWrapped
2944
t.Run("setup:connect", func(t *testing.T) {
3045
connectionPool := liteclient.NewConnectionPool()

0 commit comments

Comments
 (0)