Documentation ¶
Overview ¶
Package test defines structs useful for testing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Cleanup ¶
Cleanup deletes the directory the given file is in. Usually meant to be used in a deferred call.
func LoadTestFile ¶
LoadTestFile fetches the contents of the file from the testdata directory as a string.
func NewCredentials ¶
func NewCredentials() *sts.Credentials
NewCredentials creates a new Credentials struct with populated values.
func PrepTempFile ¶
PrepTempFile takes the directory of the given temp file and ensures that it exists.
Types ¶
type ArrayInput ¶
type ArrayInput struct {
// contains filtered or unexported fields
}
ArrayInput implements input.Prompter where every subsequent call to Prompt returns a new response.
func NewArrayInput ¶
func NewArrayInput(responses []string) *ArrayInput
NewArrayInput creates a new ArrayInput struct.
func (*ArrayInput) Prompt ¶
func (i *ArrayInput) Prompt(msg string) (string, error)
Prompt returns a new response based on how many calls have been made previously.
func (*ArrayInput) PromptPassword ¶
func (i *ArrayInput) PromptPassword(msg string) (string, error)
PromptPassword just returns the inputted message.
type MockSTS ¶
type MockSTS struct { stsiface.STSAPI Creds *sts.Credentials Duration int64 }
MockSTS is a mock for the AWS STS service.
func (*MockSTS) AssumeRoleWithSAML ¶
func (m *MockSTS) AssumeRoleWithSAML(in *sts.AssumeRoleWithSAMLInput) (*sts.AssumeRoleWithSAMLOutput, error)
AssumeRoleWithSAML takes in an AssumeRoleWithSAMLInput and returns AssumeRoleWithSAMLOutput.