moco is failing
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -116,7 +116,7 @@
|
||||
<dependency>
|
||||
<groupId>org.springframework.amqp</groupId>
|
||||
<artifactId>spring-rabbit</artifactId>
|
||||
<version>1.6.2.RELEASE</version>
|
||||
<version>2.0.0.M4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
|
||||
@@ -60,11 +60,6 @@ public class StubRunnerProperties {
|
||||
*/
|
||||
private String classifier = "stubs";
|
||||
|
||||
/**
|
||||
* The context path that the stub server will run under.
|
||||
*/
|
||||
private String contextPath = "";
|
||||
|
||||
/**
|
||||
* Repository username
|
||||
*/
|
||||
@@ -175,14 +170,6 @@ public class StubRunnerProperties {
|
||||
this.classifier = classifier;
|
||||
}
|
||||
|
||||
public String getContextPath() {
|
||||
return this.contextPath;
|
||||
}
|
||||
|
||||
public void setContextPath(String contextPath) {
|
||||
this.contextPath = contextPath;
|
||||
}
|
||||
|
||||
public boolean isStubsPerConsumer() {
|
||||
return this.stubsPerConsumer;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.example.loan;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@SpringBootApplication
|
||||
public class Application {
|
||||
@@ -11,3 +13,12 @@ public class Application {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@RestController
|
||||
class CustomController {
|
||||
@GetMapping("/foo")
|
||||
String foo() {
|
||||
return "bar";
|
||||
}
|
||||
}
|
||||
@@ -1,2 +1,4 @@
|
||||
server.port: 0
|
||||
server.context-path: /my-path
|
||||
server:
|
||||
port: 0
|
||||
servlet:
|
||||
context-path: /my-path
|
||||
@@ -41,7 +41,7 @@ public class LoanApplicationServiceTests {
|
||||
@Test
|
||||
public void shouldStartThisAppWithContextPath() {
|
||||
String response = new RestTemplate()
|
||||
.getForObject("http://localhost:" + this.port + "/my-path/health", String.class);
|
||||
.getForObject("http://localhost:" + this.port + "/my-path/foo", String.class);
|
||||
|
||||
assertThat(response).isNotEmpty();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user