package users_test import ( "path/filepath" "testing" "git.t-juice.club/torjus/gpaste/users" ) func TestBoltUserStore(t *testing.T) { tmpDir := t.TempDir() newFunc := func() (func(), users.UserStore) { tmpFile := filepath.Join(tmpDir, randomString(8)) store, err := users.NewBoltUserStore(tmpFile) if err != nil { t.Fatalf("Error creating store: %s", err) } cleanup := func() { store.Close() } return cleanup, store } RunUserStoreTest(newFunc, t) }