|
|
|
@ -181,7 +181,7 @@ public class EurekaInstanceConfigBeanTests {
@@ -181,7 +181,7 @@ public class EurekaInstanceConfigBeanTests {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
public void testVirtualHostName() throws Exception { |
|
|
|
|
public void testDefaultVirtualHostName() throws Exception { |
|
|
|
|
addEnvironment(this.context, "spring.application.name:myapp"); |
|
|
|
|
setupContext(); |
|
|
|
|
assertEquals("virtualHostName wrong", "myapp", getInstanceConfig().getVirtualHostName()); |
|
|
|
@ -189,6 +189,16 @@ public class EurekaInstanceConfigBeanTests {
@@ -189,6 +189,16 @@ public class EurekaInstanceConfigBeanTests {
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
public void testCustomVirtualHostName() throws Exception { |
|
|
|
|
addEnvironment(this.context, "spring.application.name:myapp", "eureka.instance.virtualHostName=myvirthost", |
|
|
|
|
"eureka.instance.secureVirtualHostName=mysecurevirthost"); |
|
|
|
|
setupContext(); |
|
|
|
|
assertEquals("virtualHostName wrong", "myvirthost", getInstanceConfig().getVirtualHostName()); |
|
|
|
|
assertEquals("secureVirtualHostName wrong", "mysecurevirthost", getInstanceConfig().getSecureVirtualHostName()); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
public void testDefaultAppName() throws Exception { |
|
|
|
|
setupContext(); |
|
|
|
|