Documentation
¶
Overview ¶
Package credtest provides a hermetic credential environment for tests (§1.12 test obligation). It forces credstore's encrypted-file backend inside a per-test temp HOME with a fixed passphrase, so no test ever touches the real OS keyring, shells out to `security`/`secret-tool`, or depends on machine state.
It is deliberately a tiny leaf (only testing + migrationsink) so that the white-box `package keychain` tests can import it without the keychain<->testutil import cycle that the fixture-heavy internal/testutil would introduce.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Setup ¶
Setup isolates HOME/XDG to a temp dir and forces credstore's file backend with a known passphrase via the §1.4 named env vars. The darwin `security` and Linux `secret-tool` legacy probes are neutralized so the suite is hermetic regardless of the destination backend (§2.3). Returns the temp dir so a test can plant legacy artifacts (token.json, credentials.json, config.json, a keychain item) under it.
Types ¶
This section is empty.