|
1 | 1 | # Chainlink Node Set Compatibility Testing Environment |
2 | 2 |
|
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. |
4 | 4 |
|
5 | 5 | Create a configuration file `smoke.toml` |
6 | 6 | ```toml |
@@ -78,69 +78,13 @@ Create a configuration file `smoke.toml` |
78 | 78 | user_secrets_overrides = "" |
79 | 79 | ``` |
80 | 80 |
|
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) |
122 | 82 |
|
123 | 83 | Run it |
124 | 84 | ```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 |
141 | 86 | ``` |
142 | 87 |
|
143 | 88 | Summary: |
144 | 89 | - 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