Documentation
¶
Index ¶
- func GetURI(ctx context.Context, container testcontainers.Container) (string, error)
- func SendHttpDelete(container testcontainers.Container, endpoint string) (int, string, error)
- func SendHttpGet(container testcontainers.Container, endpoint string, ...) (int, string, error)
- func SendHttpPatch(container testcontainers.Container, endpoint string, body io.Reader) (int, string, error)
- func SendHttpPost(container testcontainers.Container, endpoint string, body io.Reader) (int, string, error)
- func SendHttpPut(container testcontainers.Container, endpoint string, body io.Reader) (int, string, error)
- func WithFile(name string, filePath string) testcontainers.CustomizeRequestOption
- func WithImage(image string) testcontainers.CustomizeRequestOption
- func WithMappingFile(id string, filePath string) testcontainers.CustomizeRequestOption
- type WireMockContainer
- func RunContainer(ctx context.Context, opts ...testcontainers.ContainerCustomizer) (*WireMockContainer, error)
- func RunContainerAndStopOnCleanup(ctx context.Context, t *testing.T, opts ...testcontainers.ContainerCustomizer) (*WireMockContainer, error)
- func RunDefaultContainerAndStopOnCleanup(ctx context.Context, t *testing.T) (*WireMockContainer, error)
- type WireMockExtension
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SendHttpDelete ¶
SendHttpDelete sends Http DELETE request to the container passed as an argument.
func SendHttpGet ¶
func SendHttpGet(container testcontainers.Container, endpoint string, queryParams map[string]string) (int, string, error)
SendHttpGet sends Http GET request to the container passed as an argument. 'queryParams' parameter is optional and can be passed as a nil. Query parameters also work when hardcoded in the endpoint argument.
func SendHttpPatch ¶
func SendHttpPatch(container testcontainers.Container, endpoint string, body io.Reader) (int, string, error)
SendHttpPatch sends Http PATCH request to the container passed as an argument.
func SendHttpPost ¶
func SendHttpPost(container testcontainers.Container, endpoint string, body io.Reader) (int, string, error)
SendHttpPost sends Http POST request to the container passed as an argument.
func SendHttpPut ¶
func SendHttpPut(container testcontainers.Container, endpoint string, body io.Reader) (int, string, error)
SendHttpPut sends Http PUT request to the container passed as an argument.
func WithMappingFile ¶
Types ¶
type WireMockContainer ¶
type WireMockContainer struct { testcontainers.Container Client *wiremock.Client // contains filtered or unexported fields }
func RunContainer ¶
func RunContainer(ctx context.Context, opts ...testcontainers.ContainerCustomizer) (*WireMockContainer, error)
RunContainer creates an instance of the WireMockContainer type
func RunContainerAndStopOnCleanup ¶
func RunContainerAndStopOnCleanup(ctx context.Context, t *testing.T, opts ...testcontainers.ContainerCustomizer) (*WireMockContainer, error)
Creates an instance of the WireMockContainer type that is automatically terminated upon test completion
func RunDefaultContainerAndStopOnCleanup ¶
func RunDefaultContainerAndStopOnCleanup(ctx context.Context, t *testing.T) (*WireMockContainer, error)
Creates a default instance of the WireMockContainer type that is automatically terminated upon test completion
type WireMockExtension ¶
type WireMockExtension struct { testcontainers.Container // contains filtered or unexported fields }