Documentation
¶
Overview ¶
Package testsupport holds helpers shared by Kivgraph tests. It is not imported by production code.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RequireRustAnalyzer ¶
RequireRustAnalyzer skips the test unless this machine can actually run rust-analyzer.
Presence on PATH does not answer that. rustup installs a proxy named rust-analyzer for every toolchain, whether or not the component behind it was ever added, and that proxy exits with "Unknown binary 'rust-analyzer' in official toolchain". A guard that only looks the name up reports the analyzer as installed on any machine with rustup, so the tests run and fail instead of skipping — which is exactly what a hosted runner without `rustup component add rust-analyzer` looks like.
Running `--version` is the cheapest question whose answer is the one the caller needs.
func RequireSpaceOrSkip ¶
RequireSpaceOrSkip turns the one failure that belongs to the host rather than to the code under test into a skip.
Publishing a generation refuses a filesystem that is more than 85% full, whatever the size of the database, so on such a host a test that needs a published generation never reaches the behaviour it asserts. The policy itself is covered by the generation package, which builds its store with an explicit one.
func TempDir ¶
TempDir returns a per-test temporary directory whose path contains no symlink component.
Repository path validation rejects a path with a symlinked ancestor, and that policy is deliberate. On macOS the directory returned by t.TempDir() lives under /var/folders and /var is a symlink to /private/var, so a test that feeds t.TempDir() to the workspace layer exercises the rejection instead of the behaviour under test. Resolving the realpath here keeps the production policy untouched.
Types ¶
This section is empty.