Four unit tests in internal/credentials/file_test.go for behaviors that have no e2e coverage (e2e exercises file-backend writes round-trip but never stats the mode, never simulates a crash, never races two processes, never observes the fallback warning): - TestFileBackend_SetReassertsMode pre-creates the file at 0o644 and asserts Set narrows it to 0o600 via Chmod-after-Rename. - TestFileBackend_SetCleansUpTmpFile scans the dir after Set and fails on any leftover .credentials-*.tmp. - TestFileBackend_ConcurrentWritersSerialize runs two goroutines writing distinct keys; both records must survive (verifies the flock around load-mutate-save). - TestChain_SetWarnsOnFallback captures ChainStderr via bytes.Buffer and asserts the one-line warning when a writable backend errors before the file backend succeeds. |
||
|---|---|---|
| .. | ||
| env.go | ||
| file.go | ||
| file_test.go | ||
| keyring.go | ||
| lock_other.go | ||
| lock_unix.go | ||
| store.go | ||