mirror of https://github.com/apache/archiva.git
MRM-752 - Trim URL in Remote Repositories
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@658219 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8dd8717642
commit
a42449e3e6
|
@ -59,6 +59,9 @@ public class AddRemoteRepositoryAction
|
|||
{
|
||||
Configuration configuration = archivaConfiguration.getConfiguration();
|
||||
|
||||
//MRM-752 - url needs trimming
|
||||
repository.setUrl(repository.getUrl().trim());
|
||||
|
||||
// Save the repository configuration.
|
||||
String result;
|
||||
try
|
||||
|
|
|
@ -102,11 +102,15 @@ public class AddRemoteRepositoryActionTest
|
|||
action.prepare();
|
||||
RemoteRepositoryConfiguration repository = action.getRepository();
|
||||
populateRepository( repository );
|
||||
|
||||
assertEquals("url ", repository.getUrl());
|
||||
|
||||
String status = action.commit();
|
||||
assertEquals( Action.SUCCESS, status );
|
||||
|
||||
assertEquals( Collections.singletonList( repository ), configuration.getRemoteRepositories() );
|
||||
|
||||
assertEquals("url", repository.getUrl());
|
||||
|
||||
archivaConfigurationControl.verify();
|
||||
}
|
||||
|
@ -115,7 +119,7 @@ public class AddRemoteRepositoryActionTest
|
|||
{
|
||||
repository.setId( REPO_ID );
|
||||
repository.setName( "repo name" );
|
||||
repository.setUrl( "url" );
|
||||
repository.setUrl( "url " );
|
||||
repository.setLayout( "default" );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue