mirror of
https://github.com/keycloak/keycloak.git
synced 2026-01-09 23:12:06 -03:30
Use http for the DockerClientTest to avoid certificate issues (#44175)
Closes #44117 (cherry picked from commit fb13aa50390ddfb03cce2bd2f798e5547d2c433c) Signed-off-by: rmartinc <rmartinc@redhat.com>
This commit is contained in:
parent
ac227ca956
commit
abaa38a8a8
@ -21,7 +21,9 @@ import static java.lang.Integer.parseInt;
|
||||
|
||||
public class ServerURLs {
|
||||
public static final boolean AUTH_SERVER_SSL_REQUIRED = Boolean.parseBoolean(System.getProperty("auth.server.ssl.required", "true"));
|
||||
public static final String AUTH_SERVER_PORT = AUTH_SERVER_SSL_REQUIRED ? System.getProperty("auth.server.https.port", "8543") : System.getProperty("auth.server.http.port", "8180");
|
||||
public static final String AUTH_SERVER_PORT_HTTP = System.getProperty("auth.server.http.port", "8180");
|
||||
public static final String AUTH_SERVER_PORT_HTTPS = System.getProperty("auth.server.https.port", "8543");
|
||||
public static final String AUTH_SERVER_PORT = AUTH_SERVER_SSL_REQUIRED ? AUTH_SERVER_PORT_HTTPS : AUTH_SERVER_PORT_HTTP;
|
||||
public static final String AUTH_SERVER_SCHEME = AUTH_SERVER_SSL_REQUIRED ? "https" : "http";
|
||||
public static final String AUTH_SERVER_HOST = System.getProperty("auth.server.host", "localhost");
|
||||
public static final String AUTH_SERVER_HOST2 = System.getProperty("auth.server.host2", AUTH_SERVER_HOST);
|
||||
|
||||
@ -29,8 +29,7 @@ import java.util.Optional;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.hamcrest.Matchers.is;
|
||||
import static org.junit.Assume.assumeTrue;
|
||||
import static org.keycloak.testsuite.util.ServerURLs.AUTH_SERVER_PORT;
|
||||
import static org.keycloak.testsuite.util.ServerURLs.AUTH_SERVER_SCHEME;
|
||||
import static org.keycloak.testsuite.util.ServerURLs.AUTH_SERVER_PORT_HTTP;
|
||||
import static org.keycloak.testsuite.util.WaitUtils.pause;
|
||||
|
||||
@EnableFeature(Profile.Feature.DOCKER)
|
||||
@ -105,9 +104,9 @@ public class DockerClientTest extends AbstractKeycloakTest {
|
||||
|
||||
final Map<String, String> environment = new HashMap<>();
|
||||
environment.put("REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY", "/tmp");
|
||||
environment.put("REGISTRY_AUTH_TOKEN_REALM", AUTH_SERVER_SCHEME + "://" + hostIp + ":" + AUTH_SERVER_PORT + "/auth/realms/" + REALM_ID + "/protocol/docker-v2/auth");
|
||||
environment.put("REGISTRY_AUTH_TOKEN_REALM", "http://" + hostIp + ":" + AUTH_SERVER_PORT_HTTP + "/auth/realms/" + REALM_ID + "/protocol/docker-v2/auth");
|
||||
environment.put("REGISTRY_AUTH_TOKEN_SERVICE", CLIENT_ID);
|
||||
environment.put("REGISTRY_AUTH_TOKEN_ISSUER", AUTH_SERVER_SCHEME + "://" + hostIp + ":" + AUTH_SERVER_PORT + "/auth/realms/" + REALM_ID);
|
||||
environment.put("REGISTRY_AUTH_TOKEN_ISSUER", "http://" + hostIp + ":" + AUTH_SERVER_PORT_HTTP + "/auth/realms/" + REALM_ID);
|
||||
environment.put("REGISTRY_AUTH_TOKEN_ROOTCERTBUNDLE", "/opt/kc-certs/" + tmpCertFile.getCanonicalFile().getName());
|
||||
environment.put("INSECURE_REGISTRY", "--insecure-registry " + REGISTRY_HOSTNAME + ":" + REGISTRY_PORT);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user