ntfy/attachment/store_file_test.go
binwiederhier 071543efda Fixes
2026-03-25 15:28:23 -04:00

17 lines
353 B
Go

package attachment
import (
"testing"
"time"
"github.com/stretchr/testify/require"
)
func newTestFileStore(t *testing.T, totalSizeLimit int64) (dir string, cache *Store) {
t.Helper()
dir = t.TempDir()
cache, err := NewFileStore(dir, totalSizeLimit, time.Hour, nil)
require.Nil(t, err)
t.Cleanup(func() { cache.Close() })
return dir, cache
}