Skip to content

Commit a95b114

Browse files
authored
fix(nodebuilder): Use test node for tests instead of New (#1350)
Fixes issue with this test not using in-memory keyring.
1 parent 90bd741 commit a95b114

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

nodebuilder/node_bridge_test.go

+5-8
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,19 @@ func TestBridge_WithMockedCoreClient(t *testing.T) {
3535
// TestBridge_HasStubDaser verifies that a bridge node implements a stub daser that returns an
3636
// error and empty das.SamplingStats
3737
func TestBridge_HasStubDaser(t *testing.T) {
38-
repo := MockStore(t, DefaultConfig(node.Bridge))
39-
4038
ctx, cancel := context.WithCancel(context.Background())
4139
t.Cleanup(cancel)
4240

4341
_, client := core.StartTestClient(ctx, t)
44-
node, err := New(node.Bridge, p2p.Private, repo, coremodule.WithClient(client))
45-
require.NoError(t, err)
46-
require.NotNil(t, node)
47-
err = node.Start(ctx)
42+
nd := TestNode(t, node.Bridge, coremodule.WithClient(client))
43+
require.NotNil(t, nd)
44+
err := nd.Start(ctx)
4845
require.NoError(t, err)
4946

50-
stats, err := node.DASer.SamplingStats(ctx)
47+
stats, err := nd.DASer.SamplingStats(ctx)
5148
assert.EqualError(t, err, "moddas: dasing is not available on bridge nodes")
5249
assert.Equal(t, stats, das.SamplingStats{})
5350

54-
err = node.Stop(ctx)
51+
err = nd.Stop(ctx)
5552
require.NoError(t, err)
5653
}

0 commit comments

Comments
 (0)