(t *testing.T)
| 36 | ) |
| 37 | |
| 38 | func NewTestStorage(t *testing.T) (sto blobserver.Storage, root string) { |
| 39 | epochLock.Lock() |
| 40 | rootEpoch++ |
| 41 | path := fmt.Sprintf("%s/camli-testroot-%d-%d", os.TempDir(), os.Getpid(), rootEpoch) |
| 42 | epochLock.Unlock() |
| 43 | if err := os.MkdirAll(path, 0755); err != nil { |
| 44 | t.Fatalf("Failed to create temp directory %q: %v", path, err) |
| 45 | } |
| 46 | return files.NewStorage(files.OSFS(), path), path |
| 47 | } |
| 48 | |
| 49 | func TestEnumerate(t *testing.T) { |
| 50 | ds, root := NewTestStorage(t) |
no test coverage detected