itest: add the -nativesql flag to run SQL itests with native SQL tables

This commit is contained in:
Andras Banki-Horvath
2023-12-12 14:50:15 +01:00
parent 7a45bbbeab
commit ba8e7550d5
6 changed files with 29 additions and 7 deletions

View File

@@ -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,