aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules
diff options
context:
space:
mode:
Diffstat (limited to 'archiva-modules')
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/RemoteRepositoriesServiceTest.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/RemoteRepositoriesServiceTest.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/RemoteRepositoriesServiceTest.java
index db857719f..3d284e452 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/RemoteRepositoriesServiceTest.java
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/RemoteRepositoriesServiceTest.java
@@ -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,