Skip to content

Commit 24ec2c0

Browse files
committed
simplify compat env
1 parent 0ffa346 commit 24ec2c0

File tree

1 file changed

+4
-60
lines changed

1 file changed

+4
-60
lines changed

book/src/framework/nodeset_compatibility.md

Lines changed: 4 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Chainlink Node Set Compatibility Testing Environment
22

3-
The difference between this and [basic node set configuration](nodeset_compatibility.md) is that here you can provide any custom configuration for CL nodes.
3+
The difference between this and [basic node set configuration](nodeset_environment.md) is that here you can provide any custom configuration for CL nodes.
44

55
Create a configuration file `smoke.toml`
66
```toml
@@ -78,69 +78,13 @@ Create a configuration file `smoke.toml`
7878
user_secrets_overrides = ""
7979
```
8080

81-
Create a file `smoke_test.go`
82-
```golang
83-
package capabilities_test
84-
85-
import (
86-
"fmt"
87-
"github.com/smartcontractkit/chainlink-testing-framework/framework"
88-
"github.com/smartcontractkit/chainlink-testing-framework/framework/components/blockchain"
89-
"github.com/smartcontractkit/chainlink-testing-framework/framework/components/fake"
90-
ns "github.com/smartcontractkit/chainlink-testing-framework/framework/components/simple_node_set"
91-
"github.com/stretchr/testify/require"
92-
"os"
93-
"testing"
94-
)
95-
96-
type Config struct {
97-
BlockchainA *blockchain.Input `toml:"blockchain_a" validate:"required"`
98-
MockerDataProvider *fake.Input `toml:"data_provider" validate:"required"`
99-
NodeSet *ns.Input `toml:"nodeset" validate:"required"`
100-
}
101-
102-
func TestDON(t *testing.T) {
103-
in, err := framework.Load[Config](t)
104-
require.NoError(t, err)
105-
pkey := os.Getenv("PRIVATE_KEY")
106-
107-
bc, err := blockchain.NewBlockchainNetwork(in.BlockchainA)
108-
require.NoError(t, err)
109-
dp, err := fake.NewFakeDataProvider(in.MockerDataProvider)
110-
require.NoError(t, err)
111-
out, err := ns.NewSharedDBNodeSet(in.NodeSet, bc, dp.BaseURLDocker)
112-
require.NoError(t, err)
113-
114-
t.Run("test something", func(t *testing.T) {
115-
for i, n := range out.CLNodes {
116-
require.NotEmpty(t, n.Node.HostURL)
117-
require.NotEmpty(t, n.Node.HostP2PURL)
118-
}
119-
})
120-
}
121-
```
81+
You can reuse `smoke_test.go` from previous [setup](nodeset_environment.md)
12282

12383
Run it
12484
```bash
125-
go test -v -run TestNodeSetCompat
126-
```
127-
128-
You'll see something like, use any URL to access CL node
129-
```bash
130-
6:14PM INF Chainlink node url URL=http://127.0.0.1:34041
131-
6:14PM INF Chainlink node url URL=http://127.0.0.1:34045
132-
6:14PM INF Chainlink node url URL=http://127.0.0.1:34044
133-
6:14PM INF Chainlink node url URL=http://127.0.0.1:34042
134-
6:14PM INF Chainlink node url URL=http://127.0.0.1:34043
135-
```
136-
137-
Use credentials to authorize:
138-
```
139-
140-
fj293fbBnlQ!f9vNs
85+
go test -v -run TestNodeSet
14186
```
14287

14388
Summary:
14489
- We deployed fully-fledged set of Chainlink nodes connected to some blockchain and faked external data provider
145-
- We understood how we can test different versions of Chainlink nodes for compatibility
146-
- We explored the Chainlink node UI
90+
- We understood how we can test different versions of Chainlink nodes for compatibility and override configs

0 commit comments

Comments
 (0)