feat(lib/store): add bbolt store implementation

Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
Xe Iaso
2025-07-03 18:02:17 +00:00
parent ddb7b0e99e
commit 45f6fa2194
12 changed files with 353 additions and 6 deletions

View File

@@ -2,6 +2,7 @@ package storetest
import (
"bytes"
"encoding/json"
"errors"
"testing"
"time"
@@ -9,7 +10,16 @@ import (
"github.com/TecharoHQ/anubis/lib/store"
)
func Common(t *testing.T, s store.Interface) {
func Common(t *testing.T, f store.Factory, config json.RawMessage) {
if err := f.Valid(config); err != nil {
t.Fatal(err)
}
s, err := f.Build(t.Context(), config)
if err != nil {
t.Fatal(err)
}
for _, tt := range []struct {
name string
doer func(t *testing.T, s store.Interface) error