feat: store layer with file CRUD

This commit is contained in:
2026-08-26 21:41:47 +08:00
parent a547b69725
commit 245497999e
4 changed files with 182 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
package store
import (
"os"
"path/filepath"
"testing"
)
func TestOpen(t *testing.T) {
dir := t.TempDir()
dbPath := filepath.Join(dir, "test.db")
s, err := Open(dbPath)
if err != nil {
t.Fatalf("Open failed: %v", err)
}
defer s.Close()
if _, err := os.Stat(dbPath); os.IsNotExist(err) {
t.Error("Database file not created")
}
}