Documentation ¶
Overview ¶
Package testing contains various helpers in sub packages for writing high value tests.
Directories ¶
Path | Synopsis |
---|---|
Package compiler helps efficiently compile and cleanup your services in acceptance tests.
|
Package compiler helps efficiently compile and cleanup your services in acceptance tests. |
Package dbfixture will setup a and reset a fresh database for each of your tests.
|
Package dbfixture will setup a and reset a fresh database for each of your tests. |
Package fakemetrics provides an implementation of the o11y metrics provider that will record all metrics you send it.
|
Package fakemetrics provides an implementation of the o11y metrics provider that will record all metrics you send it. |
Package fakestatsd provides a recording statsd server that will listen on a local UDP port.
|
Package fakestatsd provides a recording statsd server that will listen on a local UDP port. |
Package httprecorder provides a simple way of recording and later retrieving all requests that are sent to an HTTP handler.
|
Package httprecorder provides a simple way of recording and later retrieving all requests that are sent to an HTTP handler. |
ginrecorder
Package ginrecorder provides a middleware to wire a httprecorder into Gin routers used in test fakes.
|
Package ginrecorder provides a middleware to wire a httprecorder into Gin routers used in test fakes. |
httpnetrecorder
Package httpnetrecorder provides a middleware to wire a httprecorder into test fakes.
|
Package httpnetrecorder provides a middleware to wire a httprecorder into test fakes. |
internal
|
|
types
Package types contains various interfaces for writing tests.
|
Package types contains various interfaces for writing tests. |
Package kongtest helps write golden tests for your [Kong](https://github.com/alecthomas/kong) CLI parsing.
|
Package kongtest helps write golden tests for your [Kong](https://github.com/alecthomas/kong) CLI parsing. |
Package mongofixture will setup an isolated Mongo DB for your tests, so they don't interfere.
|
Package mongofixture will setup an isolated Mongo DB for your tests, so they don't interfere. |
Package rabbitfixture will setup isolated RabbitMQ VHost for your tests, so they don't interfere.
|
Package rabbitfixture will setup isolated RabbitMQ VHost for your tests, so they don't interfere. |
Package redisfixture will setup an isolated Redis DB for your tests, so they don't interfere.
|
Package redisfixture will setup an isolated Redis DB for your tests, so they don't interfere. |
Package releases is a helper to determine which binaries to download for end to end tests.
|
Package releases is a helper to determine which binaries to download for end to end tests. |
Package runner allows you to run a binary in an acceptance test (scan output for ports, wait for start).
|
Package runner allows you to run a binary in an acceptance test (scan output for ports, wait for start). |
Package testcontext provides a context with o11y wired in, setup for coloured logging and no-op metrics.
|
Package testcontext provides a context with o11y wired in, setup for coloured logging and no-op metrics. |
Package testcontextotel provides a context with o11y wired in, setup for coloured logging and no-op metrics.
|
Package testcontextotel provides a context with o11y wired in, setup for coloured logging and no-op metrics. |
Click to show internal directories.
Click to hide internal directories.