Documentation
¶
Overview ¶
Package consenttest provides a backend-agnostic conformance suite for the consent.Store interface. Every backend (memory, sqlite, postgres, mongo) is expected to pass the same contract, so behavioral drift between them is caught here rather than in production.
Consent records are the evidence that someone agreed to something, so the cases lean on the parts a regulator would ask about: that a grant for one purpose does not imply another, that revocation is recorded with a time, and that one tenant cannot read another's record of who agreed to what.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Fixture ¶
type Fixture struct {
Store consent.Store
AppID id.AppID
UserID id.UserID
// OtherUserID is a second user under the same app, and OtherAppID a
// second tenant. Consent is keyed on user, app and purpose together, so
// both boundaries need proving.
OtherUserID id.UserID
OtherAppID id.AppID
OtherAppUser id.UserID
}
Fixture is one backend ready to test, plus the rows its records hang off.
Click to show internal directories.
Click to hide internal directories.