Moving an ignored test to samples

since the releaser ignores the modules that do not get deployed, then it's safe to bring back this test

fixes gh-626
This commit is contained in:
Marcin Grzejszczak
2018-10-18 08:21:17 +02:00
parent 50d62b6ee8
commit bd4783eefd
10 changed files with 637 additions and 10 deletions

View File

@@ -0,0 +1,29 @@
package com.example;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.cloud.contract.wiremock.AutoConfigureWireMock;
import org.springframework.test.context.junit4.SpringRunner;
import static org.assertj.core.api.Assertions.assertThat;
@RunWith(SpringRunner.class)
@SpringBootTest(classes = WiremockTestsApplication.class,
properties = "app.baseUrl=http://localhost:${wiremock.server.port}",
webEnvironment = WebEnvironment.NONE)
// resource from a Initilizr stubs jar
@AutoConfigureWireMock(port = 0,
files = "classpath*:META-INF/io.spring.initializr/initializr-web/0.4.0.BUILD-SNAPSHOT")
public class AutoConfigureWireMockFilesApplicationWithUrlResourceTests {
@Autowired private Service service;
@Test public void contextLoads() throws Exception {
assertThat(this.service.pom())
.contains("<artifactId>spring-boot-starter-parent</artifactId>");
}
}