Add bbolt store

This commit is contained in:
2022-08-31 23:22:20 +02:00
parent 52c2bd1060
commit 940a512d56
7 changed files with 294 additions and 68 deletions

View File

@@ -0,0 +1,23 @@
package store_test
import (
"os"
"testing"
"git.t-juice.club/torjus/apiary/honeypot/ssh/store"
)
func TestBBoltStore(t *testing.T) {
dir := t.TempDir()
f, err := os.CreateTemp(dir, "apiary-test-bbolt")
if err != nil {
t.Fatal(err)
}
fname := f.Name()
f.Close()
s, err := store.NewBBoltStore(fname)
if err != nil {
t.Fatal(err)
}
testLoginAttemptStore(s, t)
}