Documentation
¶
Overview ¶
Package conformance provides the shared behavioral test suite that verifies any currus.Engine implementation against the neutral contract defined by the currus package.
The suite is the executable specification of the neutral contract. The same tests run against:
- The [currustest] in-memory fake (unit layer, always on, no daemon).
- Real engine daemons (integration layer, gated by //go:build integration and CURRUS_TEST_ENGINE=docker|podman|containerd).
Driver maintainers call Run with a factory function that returns an currus.Engine for each sub-test. Engines that implement optional capability interfaces (currus.Logger, currus.Execer, currus.Inspector, currus.Stater, currus.Waiter, currus.Eventer) are tested for those as well.
Usage (unit layer, no daemon):
func TestConformance(t *testing.T) {
conformance.Run(t, func(t *testing.T) currus.Engine {
return currustest.New()
})
}
Usage (integration layer):
//go:build integration
func TestConformanceIntegration(t *testing.T) {
conformance.Run(t, func(t *testing.T) currus.Engine {
eng, err := currus.New(context.Background())
if err != nil {
t.Skip("no reachable engine:", err)
}
t.Cleanup(func() { _ = eng.Close() })
return eng
})
}
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.