MCPcopy Create free account
hub / github.com/bufbuild/buf / testImageWithExcludedFilePaths

Function testImageWithExcludedFilePaths

private/bufpkg/bufimage/build_image_test.go:449–458  ·  view source on GitHub ↗
(t *testing.T, image bufimage.Image, excludePaths []string)

Source from the content-addressed store, hash-verified

447}
448
449func testImageWithExcludedFilePaths(t *testing.T, image bufimage.Image, excludePaths []string) {
450 t.Helper()
451 for _, imageFile := range image.Files() {
452 if !imageFile.IsImport() {
453 for _, excludePath := range excludePaths {
454 assert.False(t, normalpath.EqualsOrContainsPath(excludePath, imageFile.Path(), normalpath.Relative), "paths: %s, %s", imageFile.Path(), excludePath)
455 }
456 }
457 }
458}
459
460// BenchmarkBuildImage builds an image from the googleapis corpus (1574 proto
461// files), matching TestGoogleapis. Exercises the proto-source read path that

Callers 1

TestGoogleapisFunction · 0.85

Calls 4

EqualsOrContainsPathFunction · 0.92
FilesMethod · 0.65
IsImportMethod · 0.65
PathMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…