@@ -47,56 +47,36 @@ func buildS3Buckets(t *testing.T, ctrl *gomock.Controller) client.Services {
4747 bownershipcontrols := s3.GetBucketOwnershipControlsOutput {}
4848 require .NoError (t , faker .FakeObject (& bownershipcontrols ))
4949
50- m .EXPECT ().ListBuckets (gomock .Any (), gomock .Any (), gomock .Any ()).Return (
51- & s3.ListBucketsOutput {
52- Buckets : []s3Types.Bucket {b },
53- }, nil )
54- m .EXPECT ().GetBucketLogging (gomock .Any (), gomock .Any (), gomock .Any ()).Return (
55- & blog , nil )
56- m .EXPECT ().GetBucketPolicy (gomock .Any (), gomock .Any (), gomock .Any ()).Return (
57- & bpol , nil )
58- m .EXPECT ().GetBucketPolicyStatus (gomock .Any (), gomock .Any (), gomock .Any ()).Return (
59- & bpols , nil )
60- m .EXPECT ().GetBucketVersioning (gomock .Any (), gomock .Any (), gomock .Any ()).Return (
61- & bver , nil )
62- m .EXPECT ().GetBucketAcl (gomock .Any (), gomock .Any (), gomock .Any ()).Return (
63- & s3.GetBucketAclOutput {
64- Grants : []s3Types.Grant {bgrant },
65- }, nil )
66- m .EXPECT ().GetBucketCors (gomock .Any (), gomock .Any (), gomock .Any ()).Return (
67- & s3.GetBucketCorsOutput {
68- CORSRules : []s3Types.CORSRule {bcors },
69- }, nil )
70- m .EXPECT ().GetBucketEncryption (gomock .Any (), gomock .Any (), gomock .Any ()).Return (
71- & bencryption , nil )
72-
73- m .EXPECT ().GetPublicAccessBlock (gomock .Any (), gomock .Any (), gomock .Any ()).Return (
74- & bpba , nil )
75- m .EXPECT ().GetBucketOwnershipControls (gomock .Any (), gomock .Any (), gomock .Any ()).Return (& bownershipcontrols , nil )
76-
7750 ro := s3.GetBucketReplicationOutput {}
7851 require .NoError (t , faker .FakeObject (& ro ))
7952
80- m .EXPECT ().GetBucketReplication (gomock .Any (), gomock .Any (), gomock .Any ()).Return (& ro , nil )
81- m .EXPECT ().GetBucketTagging (gomock .Any (), gomock .Any (), gomock .Any ()).Return (
82- & btag , nil )
83- tt := s3Types.Transition {}
84- require .NoError (t , faker .FakeObject (& tt ))
85-
8653 glco := s3.GetBucketLifecycleConfigurationOutput {}
8754 require .NoError (t , faker .FakeObject (& glco ))
8855
89- m .EXPECT ().GetBucketLifecycleConfiguration (gomock .Any (), gomock .Any (), gomock .Any ()).Return (& glco , nil )
90- m .EXPECT ().GetBucketLocation (gomock .Any (), gomock .Any (), gomock .Any ()).Return (& bloc , nil )
91-
9256 websiteOutput := s3.GetBucketWebsiteOutput {}
9357 require .NoError (t , faker .FakeObject (& websiteOutput ))
9458
59+ gbnco := s3.GetBucketNotificationConfigurationOutput {}
60+ require .NoError (t , faker .FakeObject (& gbnco ))
61+
62+ m .EXPECT ().ListBuckets (gomock .Any (), gomock .Any (), gomock .Any ()).Return (& s3.ListBucketsOutput {Buckets : []s3Types.Bucket {b }}, nil )
63+ m .EXPECT ().GetBucketLogging (gomock .Any (), gomock .Any (), gomock .Any ()).Return (& blog , nil )
64+ m .EXPECT ().GetBucketPolicy (gomock .Any (), gomock .Any (), gomock .Any ()).Return (& bpol , nil )
65+ m .EXPECT ().GetBucketPolicyStatus (gomock .Any (), gomock .Any (), gomock .Any ()).Return (& bpols , nil )
66+ m .EXPECT ().GetBucketVersioning (gomock .Any (), gomock .Any (), gomock .Any ()).Return (& bver , nil )
67+ m .EXPECT ().GetBucketAcl (gomock .Any (), gomock .Any (), gomock .Any ()).Return (& s3.GetBucketAclOutput {Grants : []s3Types.Grant {bgrant }}, nil )
68+ m .EXPECT ().GetBucketCors (gomock .Any (), gomock .Any (), gomock .Any ()).Return (& s3.GetBucketCorsOutput {CORSRules : []s3Types.CORSRule {bcors }}, nil )
69+ m .EXPECT ().GetBucketEncryption (gomock .Any (), gomock .Any (), gomock .Any ()).Return (& bencryption , nil )
70+ m .EXPECT ().GetPublicAccessBlock (gomock .Any (), gomock .Any (), gomock .Any ()).Return (& bpba , nil )
71+ m .EXPECT ().GetBucketOwnershipControls (gomock .Any (), gomock .Any (), gomock .Any ()).Return (& bownershipcontrols , nil )
72+ m .EXPECT ().GetBucketReplication (gomock .Any (), gomock .Any (), gomock .Any ()).Return (& ro , nil )
73+ m .EXPECT ().GetBucketTagging (gomock .Any (), gomock .Any (), gomock .Any ()).Return (& btag , nil )
74+ m .EXPECT ().GetBucketLifecycleConfiguration (gomock .Any (), gomock .Any (), gomock .Any ()).Return (& glco , nil )
75+ m .EXPECT ().GetBucketLocation (gomock .Any (), gomock .Any (), gomock .Any ()).Return (& bloc , nil )
9576 m .EXPECT ().GetBucketWebsite (gomock .Any (), gomock .Any (), gomock .Any ()).Return (& websiteOutput , nil )
77+ m .EXPECT ().GetBucketNotificationConfiguration (gomock .Any (), gomock .Any (), gomock .Any ()).Return (& gbnco , nil )
9678
97- return client.Services {
98- S3 : m ,
99- }
79+ return client.Services {S3 : m }
10080}
10181
10282func TestS3Buckets (t * testing.T ) {
0 commit comments