@@ -18,7 +18,8 @@ import (
1818func Test_defaultRemoteFetchStrategy_ErrorWhenHttpGet (t * testing.T ) {
1919 remoteFetchStrategy := defaultRemoteFetchStrategy ("http://localhost:1234/maven2" ,
2020 testVersionStrategy (),
21- testCacheLocator ())
21+ testCacheLocator (),
22+ "" )
2223
2324 err := remoteFetchStrategy ()
2425
@@ -33,7 +34,8 @@ func Test_defaultRemoteFetchStrategy_ErrorWhenHttpStatusNot200(t *testing.T) {
3334
3435 remoteFetchStrategy := defaultRemoteFetchStrategy (server .URL ,
3536 testVersionStrategy (),
36- testCacheLocator ())
37+ testCacheLocator (),
38+ "" )
3739
3840 err := remoteFetchStrategy ()
3941
@@ -48,7 +50,8 @@ func Test_defaultRemoteFetchStrategy_ErrorWhenBodyReadIssue(t *testing.T) {
4850
4951 remoteFetchStrategy := defaultRemoteFetchStrategy (server .URL + "/maven2" ,
5052 testVersionStrategy (),
51- testCacheLocator ())
53+ testCacheLocator (),
54+ "" )
5255
5356 err := remoteFetchStrategy ()
5457
@@ -66,7 +69,8 @@ func Test_defaultRemoteFetchStrategy_ErrorWhenCannotUnzipSubFile(t *testing.T) {
6669
6770 remoteFetchStrategy := defaultRemoteFetchStrategy (server .URL + "/maven2" ,
6871 testVersionStrategy (),
69- testCacheLocator ())
72+ testCacheLocator (),
73+ "" )
7074
7175 err := remoteFetchStrategy ()
7276
@@ -88,7 +92,8 @@ func Test_defaultRemoteFetchStrategy_ErrorWhenCannotUnzip(t *testing.T) {
8892
8993 remoteFetchStrategy := defaultRemoteFetchStrategy (server .URL + "/maven2" ,
9094 testVersionStrategy (),
91- testCacheLocator ())
95+ testCacheLocator (),
96+ "" )
9297
9398 err := remoteFetchStrategy ()
9499
@@ -112,7 +117,8 @@ func Test_defaultRemoteFetchStrategy_ErrorWhenNoSubTarArchive(t *testing.T) {
112117
113118 remoteFetchStrategy := defaultRemoteFetchStrategy (server .URL + "/maven2" ,
114119 testVersionStrategy (),
115- testCacheLocator ())
120+ testCacheLocator (),
121+ "" )
116122
117123 err := remoteFetchStrategy ()
118124
@@ -141,9 +147,10 @@ func Test_defaultRemoteFetchStrategy_ErrorWhenCannotExtractSubArchive(t *testing
141147
142148 remoteFetchStrategy := defaultRemoteFetchStrategy (server .URL + "/maven2" ,
143149 testVersionStrategy (),
144- func () (s string , b bool ) {
150+ func (string ) (s string , b bool ) {
145151 return filepath .FromSlash ("/invalid" ), false
146- })
152+ },
153+ "" )
147154
148155 err := remoteFetchStrategy ()
149156
@@ -181,9 +188,10 @@ func Test_defaultRemoteFetchStrategy_ErrorWhenCannotCreateCacheDirectory(t *test
181188
182189 remoteFetchStrategy := defaultRemoteFetchStrategy (server .URL + "/maven2" ,
183190 testVersionStrategy (),
184- func () (s string , b bool ) {
191+ func (string ) (s string , b bool ) {
185192 return cacheLocation , false
186- })
193+ },
194+ "" )
187195
188196 err := remoteFetchStrategy ()
189197
@@ -218,9 +226,10 @@ func Test_defaultRemoteFetchStrategy_ErrorWhenCannotCreateSubArchiveFile(t *test
218226
219227 remoteFetchStrategy := defaultRemoteFetchStrategy (server .URL + "/maven2" ,
220228 testVersionStrategy (),
221- func () (s string , b bool ) {
229+ func (string ) (s string , b bool ) {
222230 return "/\\ 000" , false
223- })
231+ },
232+ "" )
224233
225234 err := remoteFetchStrategy ()
226235
@@ -256,9 +265,10 @@ func Test_defaultRemoteFetchStrategy_ErrorWhenSHA256NotMatch(t *testing.T) {
256265
257266 remoteFetchStrategy := defaultRemoteFetchStrategy (server .URL + "/maven2" ,
258267 testVersionStrategy (),
259- func () (s string , b bool ) {
268+ func (string ) (s string , b bool ) {
260269 return cacheLocation , false
261- })
270+ },
271+ "" )
262272
263273 err := remoteFetchStrategy ()
264274
@@ -295,9 +305,10 @@ func Test_defaultRemoteFetchStrategy(t *testing.T) {
295305
296306 remoteFetchStrategy := defaultRemoteFetchStrategy (server .URL + "/maven2" ,
297307 testVersionStrategy (),
298- func () (s string , b bool ) {
308+ func (string ) (s string , b bool ) {
299309 return cacheLocation , false
300- })
310+ },
311+ "" )
301312
302313 err := remoteFetchStrategy ()
303314
@@ -347,9 +358,10 @@ func Test_defaultRemoteFetchStrategyWithExistingDownload(t *testing.T) {
347358
348359 remoteFetchStrategy := defaultRemoteFetchStrategy (server .URL + "/maven2" ,
349360 testVersionStrategy (),
350- func () (s string , b bool ) {
361+ func (string ) (s string , b bool ) {
351362 return cacheLocation , false
352- })
363+ },
364+ "" )
353365
354366 // call it the remoteFetchStrategy(). The output location should be empty and a new file created
355367 err = remoteFetchStrategy ()
0 commit comments