@@ -53,15 +53,15 @@ func TestGetBucketAccelerateConfiguration(t *testing.T) {
53
53
54
54
type s3ClientCreatorMock struct {
55
55
extract func (string ) (* s3Location , error )
56
- create func (info * execResponseStageInfo , useAccelerateEndpoint bool ) (cloudClient , error )
56
+ create func (info * execResponseStageInfo , useAccelerateEndpoint bool , cfg * Config ) (cloudClient , error )
57
57
}
58
58
59
59
func (mock * s3ClientCreatorMock ) extractBucketNameAndPath (location string ) (* s3Location , error ) {
60
60
return mock .extract (location )
61
61
}
62
62
63
- func (mock * s3ClientCreatorMock ) createClient (info * execResponseStageInfo , useAccelerateEndpoint bool ) (cloudClient , error ) {
64
- return mock .create (info , useAccelerateEndpoint )
63
+ func (mock * s3ClientCreatorMock ) createClientWithConfig (info * execResponseStageInfo , useAccelerateEndpoint bool , cfg * Config ) (cloudClient , error ) {
64
+ return mock .create (info , useAccelerateEndpoint , cfg )
65
65
}
66
66
67
67
type s3BucketAccelerateConfigGetterMock struct {
@@ -96,7 +96,7 @@ func TestGetBucketAccelerateConfigurationTooManyRetries(t *testing.T) {
96
96
extract : func (s string ) (* s3Location , error ) {
97
97
return & s3Location {bucketName : "test" , s3Path : "test" }, nil
98
98
},
99
- create : func (info * execResponseStageInfo , useAccelerateEndpoint bool ) (cloudClient , error ) {
99
+ create : func (info * execResponseStageInfo , useAccelerateEndpoint bool , cfg * Config ) (cloudClient , error ) {
100
100
return & s3BucketAccelerateConfigGetterMock {err : errors .New ("testing" )}, nil
101
101
},
102
102
})
@@ -146,7 +146,7 @@ func TestGetBucketAccelerateConfigurationFailedCreateClient(t *testing.T) {
146
146
extract : func (s string ) (* s3Location , error ) {
147
147
return & s3Location {bucketName : "test" , s3Path : "test" }, nil
148
148
},
149
- create : func (info * execResponseStageInfo , useAccelerateEndpoint bool ) (cloudClient , error ) {
149
+ create : func (info * execResponseStageInfo , useAccelerateEndpoint bool , cfg * Config ) (cloudClient , error ) {
150
150
return nil , errors .New ("failed creation" )
151
151
},
152
152
})
@@ -172,7 +172,7 @@ func TestGetBucketAccelerateConfigurationInvalidClient(t *testing.T) {
172
172
extract : func (s string ) (* s3Location , error ) {
173
173
return & s3Location {bucketName : "test" , s3Path : "test" }, nil
174
174
},
175
- create : func (info * execResponseStageInfo , useAccelerateEndpoint bool ) (cloudClient , error ) {
175
+ create : func (info * execResponseStageInfo , useAccelerateEndpoint bool , cfg * Config ) (cloudClient , error ) {
176
176
return 1 , nil
177
177
},
178
178
})
0 commit comments