awstesting

package
v3.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Config

func Config() aws.Config

Config returns a copy of the mock configuration for unit tests.

func TestEndpointResolver

func TestEndpointResolver(url string) aws.EndpointResolverWithOptions

TestEndpointResolver returns an endpoint resolver that uses the given URL for the resolved endpoint

Types

type MockHttpClient

type MockHttpClient struct {
	Response      *http.Response
	ResponseError error
	CapturedReq   *http.Request
	CapturedBody  []byte
}

MockHttpClient is a simple utility for mocking HTTP responses and capturing requests

func (*MockHttpClient) Do

func (m *MockHttpClient) Do(req *http.Request) (*http.Response, error)

type StubCredentialsProvider

type StubCredentialsProvider struct{}

StubCredentialsProvider provides a stub credential provider that returns static credentials that never expire.

func (StubCredentialsProvider) Retrieve

Retrieve satisfies the CredentialsProvider interface. Returns stub credential value, and never error.

Jump to

Keyboard shortcuts

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