Skip to content

Fix TestDocumentationLinks with vendored dependencies - #414

Merged
folbricht merged 1 commit into
folbricht:masterfrom
matshch:fix-vendor-docs-test
Sep 2, 2026
Merged

folbricht merged 1 commit into
folbricht:masterfrom
matshch:fix-vendor-docs-test

Conversation

@matshch

@matshch matshch commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Some build systems utilize go mod vendor to support offline hermetic builds, and this command copies only Go packages and does not copy directories with documentation if they do not have any Go source code in them, thus breaking the test. But there is no reason to even check vendored code's documentation links, so just skip them.

Before this PR the following sequence of commands is broken:

go mod vendor
go test ./...

It failed with the next error:

--- FAIL: TestDocumentationLinks (0.03s)
    docs_test.go:84: 
        	Error Trace:	/Users/matshch/repos/desync/docs_test.go:84
        	Error:      	Received unexpected error:
        	            	stat vendor/cel.dev/expr/doc/intro.md: no such file or directory
        	Test:       	TestDocumentationLinks
        	Messages:   	vendor/cel.dev/expr/README.md links to doc/intro.md, which does not exist

By skipping the vendor directory in the test, we bypass this issue entirely.

Some build systems utilize `go mod vendor` to support offline hermetic builds,
and this command copies only Go packages and does not copy directories with
documentation if they do not have any Go source code in them, thus breaking
the test. But there is no reason to even check vendored code's documentation
links, so just skip them.
@folbricht

Copy link
Copy Markdown
Owner

Thank you

@folbricht
folbricht merged commit 1caabb8 into folbricht:master Sep 2, 2026
9 checks passed
@matshch
matshch deleted the fix-vendor-docs-test branch September 2, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

⌂ 换网址