Skip to content

Commit

Permalink
fix: don't make the dev service name configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
chberger committed Nov 4, 2023
1 parent 84c91e5 commit cf043b2
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@
@ConfigMapping(prefix = PREFIX)
@ConfigRoot(phase = ConfigPhase.BUILD_TIME)
public interface WireMockServerConfig {
/**
* Name of the WireMock Dev Service.
*/
@WithDefault("wiremock-server")
String serviceName();

/**
* If Dev Services for WireMock has been explicitly enabled or disabled.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
class WireMockServerProcessor {
private static final Logger LOGGER = Logger.getLogger(WireMockServerProcessor.class);
private static final String FEATURE_NAME = "wiremock";
private static final String DEV_SERVICE_NAME = "wiremock-server";
private static final String CONFIG_TEMPLATE = "%%dev,test.%s.%s";
static volatile RunningDevService devService;

Expand Down Expand Up @@ -62,7 +63,7 @@ private static RunningDevService startWireMockDevService(WireMockServerConfig co
final WireMockServer server = new WireMockServer(configuration);
server.start();

return new RunningDevService(config.serviceName(), null, server::shutdown, getPropertyKey(PORT),
return new RunningDevService(DEV_SERVICE_NAME, null, server::shutdown, getPropertyKey(PORT),
String.valueOf(config.port()));
}

Expand Down
16 changes: 0 additions & 16 deletions docs/modules/ROOT/pages/includes/quarkus-wiremock.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,6 @@ endif::add-copy-button-to-env-var[]
--|boolean
|`true`

a|icon:lock[title=Fixed at build time] [[quarkus-wiremock_quarkus.wiremock.devservices.service-name]]`link:#quarkus-wiremock_quarkus.wiremock.devservices.service-name[quarkus.wiremock.devservices.service-name]`

[.description]
--
Name of the WireMock Dev Service.

ifdef::add-copy-button-to-env-var[]
Environment variable: env_var_with_copy_button:+++QUARKUS_WIREMOCK_DEVSERVICES_SERVICE_NAME+++[]
endif::add-copy-button-to-env-var[]
ifndef::add-copy-button-to-env-var[]
Environment variable: `+++QUARKUS_WIREMOCK_DEVSERVICES_SERVICE_NAME+++`
endif::add-copy-button-to-env-var[]
--|string
|`wiremock-server`


a|icon:lock[title=Fixed at build time] [[quarkus-wiremock_quarkus.wiremock.devservices.port]]`link:#quarkus-wiremock_quarkus.wiremock.devservices.port[quarkus.wiremock.devservices.port]`

[.description]
Expand Down
1 change: 0 additions & 1 deletion docs/modules/ROOT/pages/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ Example (default) configuration for testing and local development:
%dev,test.quarkus.wiremock.devservices.reload=false
%dev,test.quarkus.wiremock.devservices.files-mapping=src/test/resources
%dev,test.quarkus.wiremock.devservices.port=8089
%dev,test.quarkus.wiremock.devservices.service-name=wiremock-server
%dev,test.quarkus.wiremock.devservices.global-response-templating=false
----

Expand Down

0 comments on commit cf043b2

Please sign in to comment.