mirror of
https://github.com/aljazceru/ark.git
synced 2025-12-17 20:24: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
84 lines
1.3 KiB
Go
84 lines
1.3 KiB
Go
package kvdb
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/btcsuite/btcwallet/walletdb"
|
|
)
|
|
|
|
func TestBolt(t *testing.T) {
|
|
tests := []struct {
|
|
name string
|
|
test func(*testing.T, walletdb.DB)
|
|
}{
|
|
{
|
|
name: "read cursor empty interval",
|
|
test: testReadCursorEmptyInterval,
|
|
},
|
|
{
|
|
name: "read cursor non empty interval",
|
|
test: testReadCursorNonEmptyInterval,
|
|
},
|
|
{
|
|
name: "read write cursor",
|
|
test: testReadWriteCursor,
|
|
},
|
|
{
|
|
name: "read write cursor with bucket and value",
|
|
test: testReadWriteCursorWithBucketAndValue,
|
|
},
|
|
{
|
|
name: "bucket creation",
|
|
test: testBucketCreation,
|
|
},
|
|
{
|
|
name: "bucket deletion",
|
|
test: testBucketDeletion,
|
|
},
|
|
{
|
|
name: "bucket for each",
|
|
test: testBucketForEach,
|
|
},
|
|
{
|
|
name: "bucket for each with error",
|
|
test: testBucketForEachWithError,
|
|
},
|
|
{
|
|
name: "bucket sequence",
|
|
test: testBucketSequence,
|
|
},
|
|
{
|
|
name: "key clash",
|
|
test: testKeyClash,
|
|
},
|
|
{
|
|
name: "bucket create delete",
|
|
test: testBucketCreateDelete,
|
|
},
|
|
{
|
|
name: "tx manual commit",
|
|
test: testTxManualCommit,
|
|
},
|
|
{
|
|
name: "tx rollback",
|
|
test: testTxRollback,
|
|
},
|
|
{
|
|
name: "prefetch",
|
|
test: testPrefetch,
|
|
},
|
|
}
|
|
|
|
for _, test := range tests {
|
|
test := test
|
|
|
|
t.Run(test.name, func(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
f := NewBoltFixture(t)
|
|
|
|
test.test(t, f.NewBackend())
|
|
})
|
|
}
|
|
}
|