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

Function TestModuleArchiveDir

cmd/buf/buf_test.go:4516–4533  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

4514}
4515
4516func TestModuleArchiveDir(t *testing.T) {
4517 // Archive that defines module at input path
4518 t.Parallel()
4519 zipDir := createZipFromDir(
4520 t,
4521 filepath.Join("testdata", "failarchive"),
4522 "archive.zip",
4523 )
4524 testRunStdout(
4525 t,
4526 nil,
4527 bufctl.ExitCodeFileAnnotation,
4528 filepath.FromSlash(`fail/buf/buf.proto:3:1:Files with package "other" must be within a directory "other" relative to root but were in directory "buf".
4529fail/buf/buf.proto:6:9:Field name "oneTwo" should be lower_snake_case, such as "one_two".`),
4530 "lint",
4531 filepath.Join(zipDir, "archive.zip#subdir=fail"),
4532 )
4533}
4534
4535func TestLintDisabledForModuleInWorkspace(t *testing.T) {
4536 t.Parallel()

Callers

nothing calls this directly

Calls 2

createZipFromDirFunction · 0.85
testRunStdoutFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…