mirror of
https://github.com/aljazceru/ark.git
synced 2026-01-19 11:44:21 +01:00
* Update protos * Update handlers * Support macaroons and TLS * Add arkd cli * Minor fixes * Update deps * Fixes * Update makefile * Fixes * Fix * Fix * Fix * Remove trusted onboarding from client * Completely remove trusted onboarding * Fix compose files and add --no-macaroon flag to arkd cli * Lint * Remove e2e for trusted onboarding * Add sleep time
36 lines
609 B
Go
36 lines
609 B
Go
package kvdb
|
|
|
|
import (
|
|
"path/filepath"
|
|
"testing"
|
|
|
|
"github.com/btcsuite/btcwallet/walletdb"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
type boltFixture struct {
|
|
t *testing.T
|
|
tempDir string
|
|
}
|
|
|
|
func NewBoltFixture(t *testing.T) *boltFixture {
|
|
return &boltFixture{
|
|
t: t,
|
|
tempDir: t.TempDir(),
|
|
}
|
|
}
|
|
|
|
func (b *boltFixture) NewBackend() walletdb.DB {
|
|
dbPath := filepath.Join(b.tempDir)
|
|
|
|
db, err := GetBoltBackend(&BoltBackendConfig{
|
|
DBPath: dbPath,
|
|
DBFileName: "test.db",
|
|
NoFreelistSync: true,
|
|
DBTimeout: DefaultDBTimeout,
|
|
})
|
|
require.NoError(b.t, err)
|
|
|
|
return db
|
|
}
|