conformance

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package conformance is a shared test suite every gateway.CertStore implementation must pass, so gateway.MemoryCertStore, gateway.FileCertStore and store/redis.Store (and any third-party implementation) are held to the exact same contract.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(t *testing.T, newStore func() gateway.CertStore)

Run exercises newStore against the gateway.CertStore contract. newStore must return a fresh, empty CertStore; Run calls it once per subtest so implementations backed by a shared external service (e.g. Redis) do not see state leak between subtests as long as newStore picks a fresh key namespace or database per call.

The suite stores real self-signed certificates rather than arbitrary bytes: gateway .FileCertStore reads NotAfter back from the leaf certificate instead of storing it separately, so only a parseable certificate lets one suite validate all three backends. Test domains use only characters FileCertStore accepts (letters, digits, dot, dash), since it rejects anything that could escape its directory.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL