If URI has no context path add one ("/")
Fixes gh-131
This commit is contained in:
@@ -16,8 +16,7 @@
|
||||
|
||||
package org.springframework.cloud.config.server;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@@ -123,5 +122,17 @@ public class JGitEnvironmentRepositoryTests {
|
||||
assertEquals(repository.getUri() + "/bar.properties", environment
|
||||
.getPropertySources().get(0).getName());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void uriWithHostOnly() throws Exception {
|
||||
repository.setUri("git://localhost");
|
||||
assertEquals("git://localhost/", repository.getUri());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void uriWithHostAndPath() throws Exception {
|
||||
repository.setUri("git://localhost/foo/");
|
||||
assertEquals("git://localhost/foo", repository.getUri());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user