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: 7 Imported by: 0

Documentation

Overview

Package conformance is a shared test suite every gateway.Presence implementation must pass, so gateway.MemoryPresence and presence/redis.Presence (and any third-party implementation) are held to the exact same contract - most importantly the lease contract, because an implementation that keeps a dead node's connections online forever makes IsOnline permanently true and silently disables the offline delivery channel.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(t *testing.T, factory func(t *testing.T) gateway.Presence)

Run exercises factory() against the gateway.Presence contract. factory must return a fresh, empty Presence; 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 factory picks a fresh key namespace or database per call.

Types

This section is empty.

Jump to

Keyboard shortcuts

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