open-vault/sdk/helper/awsutil/mocks.go
Lauren Voswinkel 5740e1ff9e
5844 AWS Root Credential Rotation (#9921)
* strip redundant field type declarations

* root credential rotation for aws creds plugin

* Change location of mocks awsutil and update methods that no longer exist

* Update website/pages/docs/auth/aws.mdx

Co-authored-by: Calvin Leung Huang <cleung2010@gmail.com>

* Update sdk version to get the awsutil mock file

* Re-vendor modules to pass CI

* Use write lock for the entirety of AWS root cred rotation

* Update docs for AWS root cred rotation for clarity

Co-authored-by: Becca Petrin <beccapetrin@gmail.com>
Co-authored-by: Calvin Leung Huang <cleung2010@gmail.com>
2020-09-15 15:26:56 -07:00

27 lines
689 B
Go

package awsutil
import (
"github.com/aws/aws-sdk-go/service/iam"
"github.com/aws/aws-sdk-go/service/iam/iamiface"
)
type MockIAM struct {
iamiface.IAMAPI
CreateAccessKeyOutput *iam.CreateAccessKeyOutput
DeleteAccessKeyOutput *iam.DeleteAccessKeyOutput
GetUserOutput *iam.GetUserOutput
}
func (m *MockIAM) CreateAccessKey(*iam.CreateAccessKeyInput) (*iam.CreateAccessKeyOutput, error) {
return m.CreateAccessKeyOutput, nil
}
func (m *MockIAM) DeleteAccessKey(*iam.DeleteAccessKeyInput) (*iam.DeleteAccessKeyOutput, error) {
return m.DeleteAccessKeyOutput, nil
}
func (m *MockIAM) GetUser(*iam.GetUserInput) (*iam.GetUserOutput, error) {
return m.GetUserOutput, nil
}