mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-01-18 21:35:24 +01:00
multi: add sqlite option to itests and github job
This commit is contained in:
parent
8c4d3345e9
commit
a5eaabf548
5
.github/workflows/main.yml
vendored
5
.github/workflows/main.yml
vendored
@ -158,6 +158,7 @@ jobs:
|
||||
- btcd unit-cover
|
||||
- unit tags="kvdb_etcd"
|
||||
- unit tags="kvdb_postgres"
|
||||
- unit tags="kvdb_sqlite"
|
||||
- btcd unit-race
|
||||
steps:
|
||||
- name: git checkout
|
||||
@ -204,6 +205,8 @@ jobs:
|
||||
args: backend=bitcoind dbbackend=etcd
|
||||
- name: bitcoind-postgres
|
||||
args: backend=bitcoind dbbackend=postgres
|
||||
- name: bitcoind-sqlite
|
||||
args: backend=bitcoind dbbackend=sqlite
|
||||
- name: neutrino
|
||||
args: backend=neutrino
|
||||
steps:
|
||||
@ -287,6 +290,8 @@ jobs:
|
||||
args: backend=bitcoind dbbackend=etcd
|
||||
- name: bitcoind-postgres
|
||||
args: backend=bitcoind dbbackend=postgres
|
||||
- name: bitcoind-sqlite
|
||||
args: backend=bitcoind dbbackend=sqlite
|
||||
- name: neutrino
|
||||
args: backend=neutrino
|
||||
steps:
|
||||
|
2
.github/workflows/release.yaml
vendored
2
.github/workflows/release.yaml
vendored
@ -94,7 +94,7 @@ jobs:
|
||||
|
||||
Our release binaries are fully reproducible. Third parties are able to verify that the release binaries were produced properly without having to trust the release manager(s). See our [reproducible builds guide](https://github.com/lightningnetwork/lnd/tree/master/build/release) for how this can be achieved.
|
||||
The release binaries are compiled with `go${{ env.GO_VERSION }}`, which is required by verifiers to arrive at the same ones.
|
||||
They include the following build tags: `autopilotrpc`, `signrpc`, `walletrpc`, `chainrpc`, `invoicesrpc`, `neutrinorpc`, `routerrpc`, `watchtowerrpc`, `monitoring`, `peersrpc`, `kvdb_postrgres`, and `kvdb_etcd`. Note that these are already included in the release script, so they do not need to be provided.
|
||||
They include the following build tags: `autopilotrpc`, `signrpc`, `walletrpc`, `chainrpc`, `invoicesrpc`, `neutrinorpc`, `routerrpc`, `watchtowerrpc`, `monitoring`, `peersrpc`, `kvdb_postrgres`, `kvdb_etcd` and `kvdb_sqlite`. Note that these are already included in the release script, so they do not need to be provided.
|
||||
|
||||
The `make release` command can be used to ensure one rebuilds with all the same flags used for the release. If one wishes to build for only a single platform, then `make release sys=<OS-ARCH> tag=<tag>` can be used.
|
||||
|
||||
|
@ -24,6 +24,7 @@ run:
|
||||
- watchtowerrpc
|
||||
- kvdb_etcd
|
||||
- kvdb_postgres
|
||||
- kvdb_sqlite
|
||||
|
||||
linters-settings:
|
||||
govet:
|
||||
|
@ -109,6 +109,9 @@ func prepareDbBackend(t *testing.T,
|
||||
case "postgres":
|
||||
dbBackend = lntest.BackendPostgres
|
||||
|
||||
case "sqlite":
|
||||
dbBackend = lntest.BackendSqlite
|
||||
|
||||
default:
|
||||
require.Fail(t, "unknown db backend")
|
||||
}
|
||||
|
@ -220,6 +220,11 @@ func (cfg *BaseNodeConfig) GenArgs() []string {
|
||||
case lntest.BackendPostgres:
|
||||
args = append(args, "--db.backend=postgres")
|
||||
args = append(args, "--db.postgres.dsn="+cfg.PostgresDsn)
|
||||
|
||||
case lntest.BackendSqlite:
|
||||
args = append(args, "--db.backend=sqlite")
|
||||
args = append(args, fmt.Sprintf("--db.sqlite.busytimeout=%v",
|
||||
lntest.SqliteBusyTimeout))
|
||||
}
|
||||
|
||||
if cfg.FeeURL != "" {
|
||||
|
@ -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 != "" {
|
||||
|
@ -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")
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -33,6 +33,7 @@ const (
|
||||
BackendBbolt DatabaseBackend = iota
|
||||
BackendEtcd
|
||||
BackendPostgres
|
||||
BackendSqlite
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -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
|
||||
)
|
||||
|
@ -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
|
||||
)
|
||||
|
@ -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
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user