8000 initial impl of running export/import without serving by DGuhr · Pull Request #15056 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,11 @@ public enum ClientAuth {
.description("The type of the trust store file. " +
"If not given, the type is automatically detected based on the file name.")
.build();

public static final Option<Boolean> HTTP_SERVER_ENABLED = new OptionBuilder<>("http-server-enabled", Boolean.class)
.category(OptionCategory.HTTP)
.hidden()
.description("Enables or disables the HTTP/s and Socket serving.")
.defaultValue(Boolean.TRUE)
.build();
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ public static PropertyMapper[] getHttpPropertyMappers() {
.transformer(HttpPropertyMappers::getHttpEnabledTransformer)
.paramLabel(Boolean.TRUE + "|" + Boolean.FALSE)
.build(),
fromOption(HttpOptions.HTTP_SERVER_ENABLED)
.to("quarkus.http.host-enabled")
.paramLabel(Boolean.TRUE + "|" + Boolean.FALSE)
.build(),
fromOption(HttpOptions.HTTP_HOST)
.to("quarkus.http.host")
.paramLabel("host")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ metrics-enabled=false

# The default configuration when running in import or export mode
%import_export.http-enabled=true
%import_export.http-server-enabled=false
%import_export.hostname-strict=false
%import_export.hostname-strict-https=false

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ void testExport(KeycloakDistribution dist) {
cliResult.assertMessage("Export of realm 'master' requested.");
cliResult.assertMessage("Export finished successfully");
cliResult.assertNoMessage("Changes detected in configuration");
cliResult.assertNoMessage("Listening on:");

cliResult = dist.run("export", "--realm=master");
cliResult.assertError("Must specify either --dir or --file options.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,6 @@ void testImport(KeycloakDistribution dist) {
cliResult.assertMessage("Realm 'master' imported");
cliResult.assertMessage("Import finished successfully");
cliResult.assertNoMessage("Changes detected in configuration");
cliResult.assertNoMessage("Listening on:");
}
}
0