multi: add sqlite option to itests and github job

This commit is contained in:
Chris Geihsler authored and Elle Mouton committed 2023-01-25 14:16:56 +02:00
1 parent 8c4d3345e9
commit a5eaabf548
12 files changed
+37 -2

No files matched your search

+5
View File
@@ -278,6 +278,11 @@ func (cfg *BaseNodeConfig) GenArgs() []string {
case BackendPostgres:
args = append(args, "--db.backend=postgres")
args = append(args, "--db.postgres.dsn="+cfg.PostgresDsn)
case BackendSqlite:
args = append(args, "--db.backend=sqlite")
args = append(args, fmt.Sprintf("--db.sqlite.busytimeout=%v",
SqliteBusyTimeout))
}
if cfg.FeeURL != "" {
+3
View File
@@ -131,6 +131,9 @@ func TestLightningNetworkDaemon(t *testing.T) {
case "postgres":
dbBackend = lntest.BackendPostgres
case "sqlite":
dbBackend = lntest.BackendSqlite
default:
require.Fail(t, "unknown db backend")
}
+1 -1
View File
@@ -49,7 +49,7 @@ var (
// dbBackendFlag specifies the backend to use.
dbBackendFlag = flag.String("dbbackend", "bbolt", "Database backend "+
"(bbolt, etcd, postgres)")
"(bbolt, etcd, postgres, sqlite)")
)
// TestLightningNetworkDaemonTemp performs a series of integration tests
+1
View File
@@ -33,6 +33,7 @@ const (
BackendBbolt DatabaseBackend = iota
BackendEtcd
BackendPostgres
BackendSqlite
)
var (
+4
View File
@@ -29,4 +29,8 @@ const (
// NodeStartTimeout is the timeout value when waiting for a node to
// become fully started.
NodeStartTimeout = time.Second * 120
// SqliteBusyTimeout is the maximum time that a call to the sqlite db
// will wait for the connection to become available.
SqliteBusyTimeout = time.Second * 10
)
+4
View File
@@ -30,4 +30,8 @@ const (
// NodeStartTimeout is the timeout value when waiting for a node to
// become fully started.
NodeStartTimeout = time.Second * 120
// SqliteBusyTimeout is the maximum time that a call to the sqlite db
// will wait for the connection to become available.
SqliteBusyTimeout = time.Second * 10
)
+4
View File
@@ -29,4 +29,8 @@ const (
// NodeStartTimeout is the timeout value when waiting for a node to
// become fully started.
NodeStartTimeout = time.Second * 120
// SqliteBusyTimeout is the maximum time that a call to the sqlite db
// will wait for the connection to become available.
SqliteBusyTimeout = time.Second * 10
)