Documentation
¶
Overview ¶
Package acceptance holds the Slice 2 acceptance tests that need a whole server rather than one package: the sentinel-secret scan of spec section 12.2, and the end-to-end walks of section 16 that cross every layer.
Nothing here needs a phone, Docker or a network, so nothing here is behind a gate. Parking a test behind a gate it does not need is how a clause stays unverified for a phase (spec section 13.2).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DatabaseArtifacts ¶
DatabaseArtifacts are the three files spec section 12.2 names by hand: the database, its write-ahead log and its shared-memory index. They are listed explicitly as well as walked, because a `-wal` that has been checkpointed away between the write and the scan would make the scan pass for the wrong reason -- so a test asserts these exist before trusting a clean result.
Types ¶
type Sentinel ¶
type Sentinel struct {
// Name is what a failure calls it: "acct A's OSID cookie".
Name string
// Value is the value itself. It is a fixture, never a real secret.
Value string
}
Sentinel is one value that must never appear at rest or in a log.
type Sighting ¶
type Sighting struct {
Sentinel Sentinel
Where string
// Context is a short excerpt with the sentinel itself replaced, so a
// failure message can be read without leaking the value a second time
// into a test log that may itself be captured.
Context string
}
Sighting is one place a sentinel was found.
func ScanFiles ¶
ScanFiles walks root and reports every sentinel found in any file under it.
It reads whole files as bytes rather than as text, deliberately. The acceptance test of spec section 12.2 is a `strings | grep`: a value written into a SQLite page, a WAL frame or a JSON blob is still a disclosure even though nothing would print it, and a scan that only looked at what a formatter would emit would miss exactly the cases that matter.
A file it cannot read is reported as an error rather than skipped: a scan that quietly skips is a scan that passes for the wrong reason.