mirror of https://github.com/apache/archiva.git
commit
e7e84d1bc7
|
@ -201,7 +201,8 @@ public class DefaultRemoteRepositoriesService
|
|||
wagon.connect( new Repository( remoteRepository.getId(), remoteRepository.getUrl() ), proxyInfo );
|
||||
|
||||
// we only check connectivity as remote repo can be empty
|
||||
wagon.getFileList( "/" );
|
||||
// MRM-1909: Wagon implementation appends a slash already
|
||||
wagon.getFileList( "" );
|
||||
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
|
|
@ -146,6 +146,21 @@ public class RemoteRepositoriesServiceTest
|
|||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void checkRemoteConnectivity()
|
||||
throws Exception {
|
||||
RemoteRepositoriesService service = getRemoteRepositoriesService();
|
||||
|
||||
WebClient.client(service).header("Authorization", authorizationHeader);
|
||||
|
||||
int initialSize = service.getRemoteRepositories().size();
|
||||
|
||||
service.addRemoteRepository(getRemoteRepository());
|
||||
|
||||
assertTrue(service.checkRemoteConnectivity("id-new"));
|
||||
|
||||
}
|
||||
|
||||
RemoteRepository getRemoteRepository()
|
||||
{
|
||||
return new RemoteRepository( "id-new", "new one", "http://foo.com", "default", "foo", "foopassword", 120,
|
||||
|
|
Loading…
Reference in New Issue