testhelper

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const TestAwsAccessKeyId = "anAccessKeyID"
View Source
const TestAwsRegion = "us-west-1"
View Source
const TestAwsSecretAccessKey = "aSecretAccessKey"
View Source
const TestResourceServerIdentifier = "https://some-resource-server"
View Source
const TestResourceServerName = "some-resource-server-name"
View Source
const TestUserPoolId = "some-user-pool-id"
View Source
const TestUserPoolName = "some-user-pool-name"

Variables

This section is empty.

Functions

func AwsCredentialsForTest

func AwsCredentialsForTest() []byte

func ListResourceServersOutputCustom

func ListResourceServersOutputCustom(userPoolId, name, identifier string) *cognitoidentityprovider.ListResourceServersOutput

func ListUserPoolsOutput

func ListUserPoolsOutput() *cognitoidentityprovider.ListUserPoolsOutput

ListUserPoolsOutput - builds a valid cognito ListUserPoolsOutput struct with the UserPoolId and UserPoolName

func ListUserPoolsResponse

func ListUserPoolsResponse() []byte

ListUserPoolsResponse - builds valid response body bytes for a successful listUserPools response

Types

type MockCognitoClient

type MockCognitoClient struct {
	mock.Mock
}

func NewMockCognitoClient

func NewMockCognitoClient() *MockCognitoClient

func (*MockCognitoClient) ExpectListResourceServers

func (mc *MockCognitoClient) ExpectListResourceServers(userPoolId string, withOutput *cognitoidentityprovider.ListResourceServersOutput, withErr error)

func (*MockCognitoClient) ExpectListUserPools

func (mc *MockCognitoClient) ExpectListUserPools(output *cognitoidentityprovider.ListUserPoolsOutput, err error)

func (*MockCognitoClient) ListResourceServers

func (mc *MockCognitoClient) ListResourceServers(userPoolId string) (*cognitoidentityprovider.ListResourceServersOutput, error)

func (*MockCognitoClient) ListUserPools

type MockCognitoHttpClient

type MockCognitoHttpClient struct {
	mock.Mock
}

func NewMockCognitoHttpClient

func NewMockCognitoHttpClient() *MockCognitoHttpClient

func (*MockCognitoHttpClient) Do

func (*MockCognitoHttpClient) ExpectListResourceServers

func (m *MockCognitoHttpClient) ExpectListResourceServers(err error)

func (*MockCognitoHttpClient) ExpectListUserPools

func (m *MockCognitoHttpClient) ExpectListUserPools(err error)

ExpectListUserPools - caller expects the listUserPools endpoint to be called with either err OR a valid response (see ListUserPoolsResponse())

Jump to

Keyboard shortcuts

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