Documentation ¶
Overview ¶
Package testutils holds test utility functions
Package testutils holds test utility functions
Index ¶
Constants ¶
View Source
const ( // IMDSSecurityCredentialsURL is the URL used by the IMDS tests IMDSSecurityCredentialsURL = "/latest/meta-data/iam/security-credentials/test" // AWSSecurityCredentialsAccessKeyIDTestValue is the AccessKeyID used by the IMDS tests AWSSecurityCredentialsAccessKeyIDTestValue = "ASIAIOSFODNN7EXAMPLE" // AWSSecurityCredentialsTypeTestValue is the AWS Credentials Type used by the IMDS tests AWSSecurityCredentialsTypeTestValue = "AWS-HMAC" // AWSSecurityCredentialsCodeTestValue is the AWS Credentials Code used by the IMDS tests AWSSecurityCredentialsCodeTestValue = "Success" // AWSSecurityCredentialsLastUpdatedTestValue is the AWS Credentials LastUpdated value used by the IMDS tests AWSSecurityCredentialsLastUpdatedTestValue = "2012-04-26T16:39:16Z" // AWSSecurityCredentialsExpirationTestValue is the AWS Credentials Expiration value used by the IMDS tests AWSSecurityCredentialsExpirationTestValue = "2324-05-01T12:00:00Z" // AWSIMDSServerTestValue is the IMDS Server used by the IMDS tests AWSIMDSServerTestValue = "EC2ws" // IMDSTestServerIP is the IMDS server IP used by the IMDS tests IMDSTestServerIP = "169.254.169.254" // IMDSTestServerCIDR is the IMDS server CIDR used by the IMDS tests IMDSTestServerCIDR = IMDSTestServerIP + "/32" // IMDSTestServerPort is the IMDS server port used by the IMDS tests IMDSTestServerPort = 8080 )
View Source
const (
// CSMDummyInterface is the Dummy interface name used by the IMDS tests
CSMDummyInterface = "dummy_csm"
)
Variables ¶
This section is empty.
Functions ¶
func CreateDummyInterface ¶
CreateDummyInterface creates a dummy interface and attaches it to the provided IP
func CreateIMDSServer ¶
CreateIMDSServer creates a fake IMDS server
func RemoveDummyInterface ¶
RemoveDummyInterface removes the provided dummy interface
func StopIMDSserver ¶
StopIMDSserver stops the provided server gracefully
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.