Skip to content

Commit a6afc39

Browse files
committed
Polish "Create service connections for image with registry host and without project"
See gh-46974
1 parent c8d29fd commit a6afc39

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/service/connection/ConnectionNamePredicateTests.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,15 @@ void organization() {
6161

6262
@Test
6363
void customDomain() {
64+
assertThat(predicateOf("redis")).accepts(sourceOf("internalhost:8080/redis"));
6465
assertThat(predicateOf("redis")).accepts(sourceOf("internalhost:8080/library/redis"));
66+
assertThat(predicateOf("redis")).accepts(sourceOf("myhost.com/redis"));
6567
assertThat(predicateOf("redis")).accepts(sourceOf("myhost.com/library/redis"));
6668
assertThat(predicateOf("redis")).accepts(sourceOf("myhost.com:8080/library/redis"));
67-
assertThat(predicateOf("redis")).accepts(sourceOf("internalhost:8080/redis"));
69+
assertThat(predicateOf("openzipkin/zipkin")).rejects(sourceOf("myhost.com:8080/zipkin"));
70+
assertThat(predicateOf("openzipkin/zipkin")).rejects(sourceOf("myhost.com:8080/library/zipkin"));
71+
assertThat(predicateOf("openzipkin/zipkin")).accepts(sourceOf("myhost.com:8080/openzipkin/zipkin"));
72+
assertThat(predicateOf("postgres")).accepts(sourceOf("docker.my-company.com/postgres:latest"));
6873
}
6974

7075
@Test

0 commit comments

Comments
 (0)