Add a switch to fail on no stubs (#1153)

* Add a switch to fail on no stubs

without this change we throw an exception if no stubs / contracts were found
with this change we catch exceptions from aether stub downloader and if there are no stubs found whatsover, and a switch is set to fail in that case, then we do throw an exception that no stubs / contracts were found

fixes gh-895
This commit is contained in:
Marcin Grzejszczak
2019-08-06 11:54:52 +02:00
committed by GitHub
parent 4f652ad1e6
commit 4ae133a0f8
20 changed files with 182 additions and 41 deletions

View File

@@ -49,8 +49,7 @@ public class FailFastLoanApplicationServiceTests {
assertThat(throwable.getCause()).isInstanceOf(BeanInstantiationException.class);
assertThat(throwable.getCause().getCause())
.isInstanceOf(IllegalArgumentException.class).hasMessageContaining(
"For groupId [org.springframework.cloud.contract.verifier.stubs] artifactId [should-not-be-found] "
+ "and classifier [stubs] the version was not resolved! The following exceptions took place");
"No stubs or contracts were found for [org.springframework.cloud.contract.verifier.stubs:should-not-be-found:+:stubs] and the switch to fail on no stubs was set.");
}
@Test