Skip to content

Commit

Permalink
chore: remove "private" prefix from control plane config (#80)
Browse files Browse the repository at this point in the history
Motivation:
Our users doesn't know about private or public control plane.

Modifications:
Remove private prefix on configuration.
  • Loading branch information
bastien-gatling authored Aug 9, 2023
1 parent 344a420 commit b839183
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/main/groovy/io/gatling/gradle/GatlingPluginExtension.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class GatlingPluginExtension {
private static final String SYSTEM_PROPS_PROPERTY = "gatling.enterprise.systemProps"
private static final String ENVIRONMENT_VARIABLES_PROPERTY = "gatling.enterprise.environmentVariables"
private static final String WAIT_FOR_RUN_END_PROPERTY = "gatling.enterprise.waitForRunEnd"
private static final String PRIVATE_CONTROL_PLANE_URL = "gatling.enterprise.privateControlPlaneUrl"
private static final String CONTROL_PLANE_URL = "gatling.enterprise.controlPlaneUrl"
private static final String PLUGIN_NAME = "gatling-gradle-plugin"

final static class Enterprise {
Expand All @@ -43,7 +43,7 @@ class GatlingPluginExtension {
private String simulationClass
private boolean batchMode
private boolean waitForRunEnd
private URL privateControlPlaneUrl
private URL controlPlaneUrl

def setBatchMode(boolean batchMode) {
this.batchMode = batchMode
Expand Down Expand Up @@ -141,12 +141,12 @@ class GatlingPluginExtension {
setWaitForRunEnd(waitForRunEnd)
}

def setPrivateControlPlaneUrl(String privateControlPlaneUrl) {
this.privateControlPlaneUrl = new URL(privateControlPlaneUrl)
def setControlPlaneUrl(String controlPlaneUrl) {
this.controlPlaneUrl = new URL(controlPlaneUrl)
}

def privateControlPlaneUrl(String privateControlPlaneUrl) {
setPrivateControlPlaneUrl(privateControlPlaneUrl)
def controlPlaneUrl(String controlPlaneUrl) {
setControlPlaneUrl(controlPlaneUrl)
}

@Input
Expand Down Expand Up @@ -238,8 +238,8 @@ class GatlingPluginExtension {

@Input
@Optional
URL getprivateControlPlaneUrl() {
return privateControlPlaneUrl ?: new URL(System.getProperty(PRIVATE_CONTROL_PLANE_URL))
URL getControlPlaneUrl() {
return controlPlaneUrl ?: new URL(System.getProperty(CONTROL_PLANE_URL))
}

EnterpriseClient initEnterpriseClient(String version) {
Expand All @@ -255,7 +255,7 @@ class GatlingPluginExtension {
}

try {
return new HttpEnterpriseClient(getUrl(), getApiToken(), PLUGIN_NAME, version, getprivateControlPlaneUrl())
return new HttpEnterpriseClient(getUrl(), getApiToken(), PLUGIN_NAME, version, getControlPlaneUrl())
} catch (UnsupportedClientException e) {
throw new InvalidUserDataException(
"Please update the Gatling Gradle plugin to the latest version for compatibility with Gatling Enterprise. See https://gatling.io/docs/gatling/reference/current/extensions/gradle_plugin/ for more information about this plugin.",
Expand Down

0 comments on commit b839183

Please sign in to comment.