Skip to content

Commit

Permalink
updated intenal error test
Browse files Browse the repository at this point in the history
  • Loading branch information
anurag4DSB committed Dec 9, 2024
1 parent cd72872 commit b3484b7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pkg/driver/provisioner_server_impl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -529,12 +529,12 @@ var _ = Describe("ProvisionerServer DriverGrantBucketAccess", func() {

It("should return Internal error when CreateBucketAccess fails", func() {
// Mock lower-level methods used by CreateBucketAccess.
mockIAMClient.CreateUserFunc = func(ctx context.Context, input *iam.CreateUserInput, opts ...func(*iam.Options)) (*iam.CreateUserOutput, error) {
return &iam.CreateUserOutput{}, nil
}
mockIAMClient.PutUserPolicyFunc = func(ctx context.Context, input *iam.PutUserPolicyInput, opts ...func(*iam.Options)) (*iam.PutUserPolicyOutput, error) {
return &iam.PutUserPolicyOutput{}, nil
}
// mockIAMClient.CreateUserFunc = func(ctx context.Context, input *iam.CreateUserInput, opts ...func(*iam.Options)) (*iam.CreateUserOutput, error) {
// return &iam.CreateUserOutput{}, nil
// }
// mockIAMClient.PutUserPolicyFunc = func(ctx context.Context, input *iam.PutUserPolicyInput, opts ...func(*iam.Options)) (*iam.PutUserPolicyOutput, error) {
// return &iam.PutUserPolicyOutput{}, nil
// }
mockIAMClient.CreateAccessKeyFunc = func(ctx context.Context, input *iam.CreateAccessKeyInput, opts ...func(*iam.Options)) (*iam.CreateAccessKeyOutput, error) {
return nil, fmt.Errorf("mock failure: unable to create access key") // Simulating failure here.
}
Expand Down

0 comments on commit b3484b7

Please sign in to comment.