Merge remote-tracking branch 'spring-operator/polish-urls-remaining-master'
# Conflicts: # README.adoc # docs/src/main/asciidoc/verifier_introduction.adoc # spring-cloud-contract-spec/src/test/groovy/org/springframework/cloud/contract/spec/internal/RegexPatternsSpec.groovy # spring-cloud-contract-stub-runner/src/test/java/org/springframework/cloud/contract/stubrunner/GitStubDownloaderTests.java
This commit is contained in:
@@ -329,7 +329,7 @@ include::{introduction_url}/spring-cloud-contract-tools/spring-cloud-contract-ma
|
||||
----
|
||||
|
||||
With this setup the JAR with groupid `com.example.standalone` and artifactid `contracts` will be downloaded
|
||||
from `http://link/to/your/nexus/or/artifactory/or/sth`. It will be then unpacked in a local temporary folder
|
||||
from `https://link/to/your/nexus/or/artifactory/or/sth`. It will be then unpacked in a local temporary folder
|
||||
and contracts present under the `com/example/server` will be picked as the ones used to generate the
|
||||
tests and the stubs. Due to this convention the producer team will know which consumer teams will be broken
|
||||
when some incompatible changes are done.
|
||||
@@ -357,7 +357,7 @@ allows us to do that. Also ```contractsPath``` need to be specified since the de
|
||||
<version>${spring-cloud-contract.version}</version>
|
||||
<configuration>
|
||||
<contractsMode>REMOTE</contractsMode>
|
||||
<contractsRepositoryUrl>http://link/to/your/nexus/or/artifactory/or/sth</contractsRepositoryUrl>
|
||||
<contractsRepositoryUrl>https://link/to/your/nexus/or/artifactory/or/sth</contractsRepositoryUrl>
|
||||
<contractDependency>
|
||||
<groupId>com.example</groupId>
|
||||
<artifactId>common-repo-with-contracts</artifactId>
|
||||
|
||||
@@ -109,7 +109,7 @@ abstract class PatternValueDslProperty<T extends DslProperty> implements RegexCr
|
||||
|
||||
@Override
|
||||
T anyHostname() {
|
||||
return createAndValidateProperty(RegexPatterns.HOSTNAME_PATTERN, "http://foo"
|
||||
return createAndValidateProperty(RegexPatterns.HOSTNAME_PATTERN, "https://foo"
|
||||
+ this.random.
|
||||
nextInt()
|
||||
+ ".com")
|
||||
@@ -125,7 +125,7 @@ abstract class PatternValueDslProperty<T extends DslProperty> implements RegexCr
|
||||
|
||||
@Override
|
||||
T anyUrl() {
|
||||
return createAndValidateProperty(RegexPatterns.URL, "http://foo"
|
||||
return createAndValidateProperty(RegexPatterns.URL, "https://foo"
|
||||
+ this.random.
|
||||
nextInt()
|
||||
+ ".com")
|
||||
|
||||
@@ -102,7 +102,7 @@ class RegexPatternsSpec extends Specification {
|
||||
'https://../' || false
|
||||
'http://?' || false
|
||||
'http://??' || false
|
||||
'http://??/' || false
|
||||
'https://??/' || false
|
||||
'http://#' || false
|
||||
'http://##' || false
|
||||
'http://##/' || false
|
||||
@@ -111,7 +111,7 @@ class RegexPatternsSpec extends Specification {
|
||||
'//a' || false
|
||||
'///a' || false
|
||||
'///' || false
|
||||
'http:///a' || false
|
||||
'https:///a' || false
|
||||
'rdar://1234' || false
|
||||
'h://test' || false
|
||||
'http:// shouldfail.com' || false
|
||||
@@ -122,7 +122,7 @@ class RegexPatternsSpec extends Specification {
|
||||
'https://a.b-.co' || false
|
||||
'https://1.1.1.1.1' || false
|
||||
'https://123.123.123' || false
|
||||
'http://3628126748' || false
|
||||
'https://3628126748' || false
|
||||
'https://.www.foo.bar/' || false
|
||||
'https://www.foo.bar./' || false
|
||||
'https://.www.foo.bar./' || false
|
||||
|
||||
@@ -257,7 +257,7 @@ and for the JUnit approach like this:
|
||||
[source,java]
|
||||
----
|
||||
@ClassRule @Shared StubRunnerRule rule = new StubRunnerRule()
|
||||
.repoRoot("http://some_url")
|
||||
.repoRoot("https://some_url")
|
||||
.downloadStub("a.b.c", "loanIssuance")
|
||||
.downloadStub("a.b.c:fraudDetectionServer")
|
||||
.withMappingsOutputFolder("target/outputmappings")
|
||||
|
||||
@@ -72,8 +72,8 @@ class StubRunnerSpringCloudAutoConfigurationSpec extends Specification {
|
||||
"${stubFinder.findStubUrl('loanIssuance').toString()}/name".toURL().text == 'loanIssuance'
|
||||
"${stubFinder.findStubUrl('fraudDetectionServer').toString()}/name".toURL().text == 'fraudDetectionServer'
|
||||
and: 'Stubs can be reached via load service discovery'
|
||||
restTemplate.getForObject('http://loanIssuance/name', String) == 'loanIssuance'
|
||||
restTemplate.getForObject('http://someNameThatShouldMapFraudDetectionServer/name', String) == 'fraudDetectionServer'
|
||||
restTemplate.getForObject('https://loanIssuance/name', String) == 'loanIssuance'
|
||||
restTemplate.getForObject('https://someNameThatShouldMapFraudDetectionServer/name', String) == 'fraudDetectionServer'
|
||||
}
|
||||
// end::test[]
|
||||
|
||||
|
||||
@@ -266,7 +266,7 @@ public class WireMockSnippetTests {
|
||||
|
||||
@Override
|
||||
public URI getUri() {
|
||||
return URI.create("http://foo/bar");
|
||||
return URI.create("https://foo/bar");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -314,7 +314,7 @@ public class WireMockSnippetTests {
|
||||
|
||||
@Override
|
||||
public URI getUri() {
|
||||
return URI.create("http://foo/bar");
|
||||
return URI.create("https://foo/bar");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -362,7 +362,7 @@ public class WireMockSnippetTests {
|
||||
|
||||
@Override
|
||||
public URI getUri() {
|
||||
return URI.create("http://foo/bar");
|
||||
return URI.create("https://foo/bar");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -409,7 +409,7 @@ public class WireMockSnippetTests {
|
||||
|
||||
@Override
|
||||
public URI getUri() {
|
||||
return URI.create("http://foo/bar");
|
||||
return URI.create("https://foo/bar");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -458,7 +458,7 @@ public class WireMockSnippetTests {
|
||||
|
||||
@Override
|
||||
public URI getUri() {
|
||||
return URI.create("http://foo/bar?myParam=");
|
||||
return URI.create("https://foo/bar?myParam=");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -97,9 +97,9 @@ class StubRunnerSpringCloudEurekaAutoConfigurationSpec extends Specification {
|
||||
"${stubFinder.findStubUrl('fraudDetectionServer').toString()}/name".toURL().text == 'fraudDetectionServer'
|
||||
and: 'Stubs can be reached via load service discovery'
|
||||
conditions.eventually {
|
||||
assert restTemplate.getForObject('http://loanIssuance/name', String) == 'loanIssuance'
|
||||
assert restTemplate.getForObject('https://loanIssuance/name', String) == 'loanIssuance'
|
||||
}
|
||||
restTemplate.getForObject('http://someNameThatShouldMapFraudDetectionServer/name', String) == 'fraudDetectionServer'
|
||||
restTemplate.getForObject('https://someNameThatShouldMapFraudDetectionServer/name', String) == 'fraudDetectionServer'
|
||||
}
|
||||
|
||||
@Configuration
|
||||
|
||||
@@ -75,8 +75,8 @@ class StubRunnerSpringCloudZookeeperAutoConfigurationSpec extends Specification
|
||||
"${stubFinder.findStubUrl('loanIssuance').toString()}/name".toURL().text == 'loanIssuance'
|
||||
"${stubFinder.findStubUrl('fraudDetectionServer').toString()}/name".toURL().text == 'fraudDetectionServer'
|
||||
and: 'Stubs can be reached via load service discovery'
|
||||
restTemplate.getForObject('http://loanIssuance/name', String) == 'loanIssuance'
|
||||
restTemplate.getForObject('http://someNameThatShouldMapFraudDetectionServer/name', String) == 'fraudDetectionServer'
|
||||
restTemplate.getForObject('https://loanIssuance/name', String) == 'loanIssuance'
|
||||
restTemplate.getForObject('https://someNameThatShouldMapFraudDetectionServer/name', String) == 'fraudDetectionServer'
|
||||
}
|
||||
|
||||
def 'should have all apps registered in Service Discovery'() {
|
||||
|
||||
Reference in New Issue
Block a user