mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-02 23:15:36 +02:00
itest: add the -nativesql flag to run SQL itests with native SQL tables
This commit is contained in:
@@ -31,6 +31,10 @@ type nodeManager struct {
|
||||
// dbBackend sets the database backend to use.
|
||||
dbBackend node.DatabaseBackend
|
||||
|
||||
// nativeSQL sets the database backend to use native SQL when
|
||||
// applicable.
|
||||
nativeSQL bool
|
||||
|
||||
// activeNodes is a map of all running nodes, format:
|
||||
// {pubkey: *HarnessNode}.
|
||||
activeNodes map[uint32]*node.HarnessNode
|
||||
@@ -48,12 +52,13 @@ type nodeManager struct {
|
||||
}
|
||||
|
||||
// newNodeManager creates a new node manager instance.
|
||||
func newNodeManager(lndBinary string,
|
||||
dbBackend node.DatabaseBackend) *nodeManager {
|
||||
func newNodeManager(lndBinary string, dbBackend node.DatabaseBackend,
|
||||
nativeSQL bool) *nodeManager {
|
||||
|
||||
return &nodeManager{
|
||||
lndBinary: lndBinary,
|
||||
dbBackend: dbBackend,
|
||||
nativeSQL: nativeSQL,
|
||||
activeNodes: make(map[uint32]*node.HarnessNode),
|
||||
standbyNodes: make(map[uint32]*node.HarnessNode),
|
||||
}
|
||||
@@ -80,6 +85,7 @@ func (nm *nodeManager) newNode(t *testing.T, name string, extraArgs []string,
|
||||
ExtraArgs: extraArgs,
|
||||
FeeURL: nm.feeServiceURL,
|
||||
DBBackend: nm.dbBackend,
|
||||
NativeSQL: nm.nativeSQL,
|
||||
NodeID: nm.nextNodeID(),
|
||||
LndBinary: nm.lndBinary,
|
||||
NetParams: harnessNetParams,
|
||||
|
Reference in New Issue
Block a user