Lots more changes

This commit is contained in:
2026-06-01 01:29:47 -05:00
parent 8bec7f0dda
commit 050ec138f3
20 changed files with 1773 additions and 689 deletions
+5 -3
View File
@@ -12,10 +12,12 @@ import (
"scratchbox/internal/storage"
)
var testStorageKey = []byte("0123456789abcdef0123456789abcdef")
func TestNewWorker(t *testing.T) {
t.Parallel()
store, err := storage.NewFilesystemStore(filepath.Join(t.TempDir(), "data"))
store, err := storage.NewFilesystemStore(filepath.Join(t.TempDir(), "data"), testStorageKey)
if err != nil {
t.Fatalf("NewFilesystemStore() error = %v", err)
}
@@ -29,7 +31,7 @@ func TestNewWorker(t *testing.T) {
func TestWorkerStartRemovesExpiredAndLogs(t *testing.T) {
t.Parallel()
store, err := storage.NewFilesystemStore(filepath.Join(t.TempDir(), "data"))
store, err := storage.NewFilesystemStore(filepath.Join(t.TempDir(), "data"), testStorageKey)
if err != nil {
t.Fatalf("NewFilesystemStore() error = %v", err)
}
@@ -53,7 +55,7 @@ func TestWorkerStartRemovesExpiredAndLogs(t *testing.T) {
func TestWorkerStartWithNoExpiredEntries(t *testing.T) {
t.Parallel()
store, err := storage.NewFilesystemStore(filepath.Join(t.TempDir(), "data"))
store, err := storage.NewFilesystemStore(filepath.Join(t.TempDir(), "data"), testStorageKey)
if err != nil {
t.Fatalf("NewFilesystemStore() error = %v", err)
}