github.com/webdestroya/awsmocker@v0.2.6/options.go (about)

     1  package awsmocker
     2  
     3  import (
     4  	"time"
     5  )
     6  
     7  type MockerOptions struct {
     8  	// Add extra logging. This is deprecated, you should just use the AWSMOCKER_DEBUG=1 env var and do a targeted test run
     9  	Verbose bool
    10  
    11  	// if true, then env vars for various aws credentials will not be set.
    12  	// This is dangerous, because if the proxy were to fail, then your requests may actually
    13  	// execute on AWS with real credentials.
    14  	//
    15  	DoNotOverrideCreds bool
    16  
    17  	// if this is true, then default mocks for GetCallerIdentity and role assumptions will not be provided
    18  	SkipDefaultMocks bool
    19  
    20  	// WARNING: Setting this to true assumes that you are able to use the config value returned
    21  	// If you do not use the provided config and set this true, then requests will not be routed properly.
    22  	ReturnAwsConfig bool
    23  
    24  	// Timeout for proxied requests.
    25  	Timeout time.Duration
    26  
    27  	// The mocks that will be responded to
    28  	Mocks []*MockedEndpoint
    29  
    30  	// Comma separated list of hostname globs that should not be proxied
    31  	// if you are doing other HTTP/HTTPS requests within your test, you should
    32  	// add the hostnames used to this.
    33  	DoNotProxy string
    34  
    35  	// Add mocks for the EC2 Instance Metadata Service
    36  	MockEc2Metadata bool
    37  
    38  	// By default, receiving an unmatched request will cause the test to be marked as failed
    39  	// you can pass true to this if you do not want to fail your test when the mocker receives an
    40  	// unmatched request
    41  	DoNotFailUnhandledRequests bool
    42  }