Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/git/vole.git

Write over SSH with a registered key:

git clone ssh://git@0.0.0.0:2222/vole.git

A free and open-source forge that lives in your Git repo.

#176

Build the test binary with the test run's tags

merged · by keenan 6d ago · merged into main at ade5c28b by keenan 6d ago

keenan opened this 6d ago

Why

The integration tests run the real vole binary, but each test harness built it with a plain go build. Tags passed to go test, such as sqlite_fts5, are not inherited by that child command, so a tagged test run was exercising an untagged server. On a checkout without libsqlite3 headers this showed up as two failures:

  • TestRebuildIndexAfterDelete: SQLite has no FTS5 module
  • TestPushRefreshesTheIndexBeforeTheNextRead: the push did not refresh the index

Both pass once the child binary is built with the same tags as the tests.

What changed

Read the -tags setting from the test binary’s build info and pass it to the child go build in both harnesses:

  • server/integration_test.go
  • server/ssh/sshserver_test.go

When the test run has no tags the helper returns nothing, so the default build is unchanged.

Verification

  • go test -tags sqlite_fts5 ./server/... passes
  • go test -tags sqlite_fts5 ./server -run 'TestRebuildIndexAfterDelete|TestPushRefreshesTheIndexBeforeTheNextRead' passes
  • ./vole workflow check

Discussion (0)

No discussion yet.