findAllEntries recursively iterates over all the dirs and returns list of file entries.
(t *testing.T, ctx context.Context, dir fs.Directory)
| 198 | |
| 199 | // findAllEntries recursively iterates over all the dirs and returns list of file entries. |
| 200 | func findAllEntries(t *testing.T, ctx context.Context, dir fs.Directory) []entry { |
| 201 | t.Helper() |
| 202 | |
| 203 | entries := []entry{} |
| 204 | |
| 205 | fs.IterateEntries(ctx, dir, func(ctx context.Context, e fs.Entry) error { |
| 206 | oid, err := object.ParseID(testutil.EnsureType[object.HasObjectID](t, e).ObjectID().String()) |
| 207 | require.NoError(t, err) |
| 208 | |
| 209 | entries = append(entries, entry{ |
| 210 | name: e.Name(), |
| 211 | objectID: oid, |
| 212 | }) |
| 213 | if e.IsDir() { |
| 214 | entries = append(entries, findAllEntries(t, ctx, testutil.EnsureType[fs.Directory](t, e))...) |
| 215 | } |
| 216 | |
| 217 | return nil |
| 218 | }) |
| 219 | |
| 220 | return entries |
| 221 | } |
| 222 | |
| 223 | func verifyMetadataCompressor(t *testing.T, ctx context.Context, rep repo.Repository, entries []entry, comp compression.HeaderID) { |
| 224 | t.Helper() |
no test coverage detected