From b3484b7811bbe09cae8e2fe40caac6b9539f0ad0 Mon Sep 17 00:00:00 2001 From: Anurag Mittal Date: Mon, 9 Dec 2024 22:53:34 +0100 Subject: [PATCH] updated intenal error test --- pkg/driver/provisioner_server_impl_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/driver/provisioner_server_impl_test.go b/pkg/driver/provisioner_server_impl_test.go index 8d395e9b..a3407641 100644 --- a/pkg/driver/provisioner_server_impl_test.go +++ b/pkg/driver/provisioner_server_impl_test.go @@ -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. }