Documentation ¶
Overview ¶
Package testutil includes utilities used in test code of other packages.
Index ¶
Constants ¶
View Source
const ( TestImage = "docker.io/orlangure/gnomock-test-image" GoodPort80 = 80 GoodPort8080 = 8080 BadPort = 8000 )
Test preset uses the following values:
Variables ¶
This section is empty.
Functions ¶
Types ¶
type TestPreset ¶
type TestPreset struct {
Img string
}
TestPreset is a preset used for tests.
func (*TestPreset) Image ¶
func (t *TestPreset) Image() string
Image returns a canonical docker image used to setup this Preset.
func (*TestPreset) Options ¶
func (t *TestPreset) Options() []gnomock.Option
Options returns a list of Option functions that allow to setup this Preset implementation. This test preset always returns a failing healthcheck.
func (*TestPreset) Ports ¶
func (t *TestPreset) Ports() gnomock.NamedPorts
Ports returns a group of ports exposed by this Preset, where every port is given a unique name.
This Preset returns port 80 by "default" name.
Click to show internal directories.
Click to hide internal directories.