gpaste/files/filestore_fs_test.go
Torjus Håkestad faa3cc102f
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Create files package
2022-01-20 03:40:32 +01:00

27 lines
505 B
Go

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