@@ -18,6 +18,7 @@ import (
18
18
"github.com/btcsuite/btcd/chaincfg/chainhash"
19
19
"github.com/btcsuite/btcd/txscript"
20
20
"github.com/btcsuite/btcd/wire"
21
+ "github.com/lightninglabs/lightning-terminal/autopilotserver/mock"
21
22
"github.com/lightningnetwork/lnd"
22
23
"github.com/lightningnetwork/lnd/lnrpc"
23
24
"github.com/lightningnetwork/lnd/lntest"
@@ -55,6 +56,8 @@ type NetworkHarness struct {
55
56
56
57
nodesByPub map [string ]* HarnessNode
57
58
59
+ autopilotServer * mock.Server
60
+
58
61
// Alice and Bob are the initial seeder nodes that are automatically
59
62
// created to be the initial participants of the test network.
60
63
Alice * HarnessNode
@@ -130,6 +133,10 @@ func (n *NetworkHarness) SetUp(t *testing.T,
130
133
err := n .server .start ()
131
134
require .NoError (t , err )
132
135
136
+ // Start a mock autopilot server.
137
+ n .autopilotServer = mock .NewServer ()
138
+ require .NoError (t , n .autopilotServer .Start ())
139
+
133
140
// Start the initial seeder nodes within the test network, then connect
134
141
// their respective RPC clients.
135
142
eg := errgroup.Group {}
@@ -260,6 +267,8 @@ func (n *NetworkHarness) TearDown() error {
260
267
func (n * NetworkHarness ) Stop () {
261
268
close (n .lndErrorChan )
262
269
close (n .quit )
270
+
271
+ n .autopilotServer .Stop ()
263
272
}
264
273
265
274
// NewNode initializes a new HarnessNode.
@@ -271,6 +280,11 @@ func (n *NetworkHarness) NewNode(t *testing.T, name string, extraArgs []string,
271
280
fmt .Sprintf ("--loop.server.tlspath=%s" , n .server .certFile ),
272
281
fmt .Sprintf ("--pool.auctionserver=%s" , n .server .serverHost ),
273
282
fmt .Sprintf ("--pool.tlspathauctserver=%s" , n .server .certFile ),
283
+ "--autopilot.insecure" ,
284
+ fmt .Sprintf (
285
+ "--autopilot.address=localhost:%d" ,
286
+ n .autopilotServer .GetPort (),
287
+ ),
274
288
}
275
289
276
290
return n .newNode (
0 commit comments