Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBackendNotRunning = errors.New("backend not running")
Functions ¶
This section is empty.
Types ¶
type Container ¶ added in v0.0.4
type Container struct {
// contains filtered or unexported fields
}
func NewContractContainer ¶
func NewContractContainer(cfg ContainerConfig) (*Container, error)
type ContainerConfig ¶ added in v0.0.4
type MockService ¶
type MockService struct {
// contains filtered or unexported fields
}
MockService represents a HTTP mock/stub implementation of Pact
func TestingMockService ¶
func TestingMockService(t *testing.T, settings ...Option) *MockService
TestingMockService creates a testing mock service test will fail if a call to verification return errors
func (*MockService) Delete ¶
func (m *MockService) Delete(ctx context.Context) error
Delete deletes all interactions
func (*MockService) URL ¶
func (m *MockService) URL() string
URL returns a URL ready to be interacted, URL will be have the form `http://localhost:port`
type Option ¶
type Option func(*options)
func WithBackend ¶
WithBackend allows to use a custom backend by default a container will be used
func WithClient ¶
WithClient allows to specify a custom *http.Client
func WithContracts ¶
WithContracts allows to specify which interactions should be loaded
func WithTimeout ¶ added in v0.0.7
WithTimeout specifies how long to wait for an http request to the mock service
Click to show internal directories.
Click to hide internal directories.