wiremock

package
v0.0.0-...-9025cd5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package wiremock does HTTP protocol stubbing using WireMock (https://wiremock.org/)

Index

Constants

This section is empty.

Variables

View Source
var Get = wiremock.Get
View Source
var MatchingJsonPath = wiremock.MatchingJsonPath
View Source
var NewResponse = wiremock.NewResponse
View Source
var Post = wiremock.Post
View Source
var URLPathEqualTo = wiremock.URLPathEqualTo

Functions

func AddStepsTo

func AddStepsTo(sc *godog.ScenarioContext)

AddStepsTo makes sure that nay unmatched requests, i.e. requests that are not stubbed get reported at the end of a scenario run TODO: reset stub state after the scenario (given not persisted flag is set)

func Endpoint

func Endpoint(ctx context.Context) (string, error)

Endpoint returns the URL of the WireMock instance

func IsRunning

func IsRunning(ctx context.Context) bool

func StartWiremock

func StartWiremock(ctx context.Context) (context.Context, error)

StartWiremock starts the WireMock instance if one is not already running

func StubFor

func StubFor(ctx context.Context, stubRule *wiremock.StubRule) error

StubFor delegates to the wiremock.StubFor of the WireMock instance assigned to the provided Context

Types

This section is empty.

Jump to

Keyboard shortcuts

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