gpaste/files/filestore_fs_test.go
Torjus Håkestad 150ffc3400
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Fix error in memorystore
2022-01-24 23:18:13 +01:00

30 lines
581 B
Go

package files_test
import (
"testing"
"git.t-juice.club/torjus/gpaste/files"
)
func TestFSFileStore(t *testing.T) {
newFunc := func() files.FileStore {
dir := t.TempDir()
s, err := files.NewFSFileStore(dir)
if err != nil {
t.Fatalf("Error creating store: %s", err)
}
return s
}
RunFilestoreTest(newFunc, t)
persistentDir := t.TempDir()
persistentFunc := func() files.FileStore {
s, err := files.NewFSFileStore(persistentDir)
if err != nil {
t.Fatalf("Error creating store: %s", err)
}
return s
}
RunPersistentFilestoreTest(persistentFunc, t)
}