Docker images (#527)
with this change we're adding generation of 2 docker images - verifier and stub runner we also added a project `spring-cloud-contract-stub-runner-boot` which contains a far jar with stub runner boot fixes gh-526, gh-516
This commit is contained in:
committed by
GitHub
parent
a5bdb32b7c
commit
37d7e8cfd3
@@ -0,0 +1,41 @@
|
||||
package contracts;
|
||||
|
||||
import io.restassured.RestAssured;
|
||||
import org.junit.Before;
|
||||
import org.junit.ClassRule;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.validator.ValidateWith;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* @author Marcin Grzejszczak
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = RestBase.Config.class,
|
||||
webEnvironment = SpringBootTest.WebEnvironment.NONE)
|
||||
public abstract class RestBase {
|
||||
|
||||
@Value("${APPLICATION_BASE_URL}") String url;
|
||||
@Value("${APPLICATION_USERNAME:}") String username;
|
||||
@Value("${APPLICATION_PASSWORD:}") String password;
|
||||
|
||||
@Before
|
||||
public void setup() {
|
||||
RestAssured.baseURI = this.url;
|
||||
if (StringUtils.hasText(this.username)) {
|
||||
RestAssured.authentication =
|
||||
RestAssured.basic(this.username, this.password);
|
||||
}
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@EnableAutoConfiguration
|
||||
protected static class Config {
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user