Documentation ¶
Overview ¶
Package drivertest provides a conformance test for implementations of the secrets driver.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunConformanceTests ¶
func RunConformanceTests(t *testing.T, newHarness HarnessMaker, asTests []AsTest)
RunConformanceTests runs conformance tests for driver implementations of secret management.
Types ¶
type AsTest ¶
type AsTest interface { // Name returns a descriptive name for the test. Name() string // ErrorCheck is called to allow verification of Keeper.ErrorAs. ErrorCheck(k *secrets.Keeper, err error) error }
AsTest represents a test of As functionality. The conformance test: 1. Tries to decrypt malformed message, and calls ErrorCheck with the error.
type Harness ¶
type Harness interface { // MakeDriver returns a pair of driver.Keeper, each backed by a different key. MakeDriver(ctx context.Context) (driver.Keeper, driver.Keeper, error) // Close is called when the test is complete. Close() }
Harness descibes the functionality test harnesses must provide to run conformance tests.
Click to show internal directories.
Click to hide internal directories.