Torjus Håkestad
faa3cc102f
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
27 lines
505 B
Go
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)
|
|
}
|