From 8d0c6e9e144fba247350bb639a51157564feb4bd Mon Sep 17 00:00:00 2001 From: Talysson de Castro Date: Wed, 17 Jan 2024 13:59:47 -0300 Subject: [PATCH] feat: Remove usePrefix and useSuffix properties (#90) * feat: Remove usePrefix and useSuffix attributes * docs: Remove usePrefix and useSuffix from examples * test: Fix unit tests that use usePrefix and useSuffix properties * test: Fix unit tests that use usePrefix and useSuffix properties * test: Keep unit tests with original behaviour for usePrefix and useSuffix * test: Keep unit tests with original behaviour for usePrefix and useSuffix --- .../mule/cli/DeployerCommandLineTest.groovy | 18 +++------- library/examples/allOptions.groovy | 4 --- .../models/deployment/ApplicationName.groovy | 6 ++-- .../FileBasedAppDeploymentRequest.groovy | 2 +- .../dsl/ApplicationNameContext.groovy | 4 +-- library/src/main/resources/evaluate.gdsl.vm | 2 -- .../mule/deployment/DeployerTest.groovy | 22 ++++++------ .../api/models/ApplicationNameTest.groovy | 14 ++++---- .../CloudhubDeploymentRequestTest.groovy | 26 +++++++------- .../CloudhubV2DeploymentRequestTest.groovy | 15 ++++---- .../models/OnPremDeploymentRequestTest.groovy | 6 ++-- .../RuntimeFabricDeploymentRequestTest.groovy | 10 +++--- .../deployment/dsl/CloudhubContextTest.groovy | 5 --- .../dsl/CloudhubV2ContextTest.groovy | 7 +--- .../dsl/MuleDeployContextTest.groovy | 30 ---------------- .../deployment/dsl/OnPremContextTest.groovy | 5 --- .../dsl/RuntimeFabricContextTest.groovy | 8 ++--- .../internal/TestFileBasedRequest.groovy | 2 +- .../subdeployers/CloudHubDeployerTest.groovy | 34 +++++++++---------- .../CloudHubV2DeployerTest.groovy | 14 ++++---- .../subdeployers/OnPremDeployerTest.groovy | 30 ++++++++-------- .../RuntimeFabricDeployerTest.groovy | 14 ++++---- .../CloudHubV2IntegrationTest.groovy | 6 ++-- .../integrationtest/IntegrationTest.groovy | 2 +- .../mule/maven/MuleDeployMojoTest.groovy | 20 ++--------- .../mule/maven/ValidateMojoTest.groovy | 6 ---- 26 files changed, 111 insertions(+), 201 deletions(-) diff --git a/cli/src/test/java/com/avioconsulting/mule/cli/DeployerCommandLineTest.groovy b/cli/src/test/java/com/avioconsulting/mule/cli/DeployerCommandLineTest.groovy index 05905d76..d49d7819 100644 --- a/cli/src/test/java/com/avioconsulting/mule/cli/DeployerCommandLineTest.groovy +++ b/cli/src/test/java/com/avioconsulting/mule/cli/DeployerCommandLineTest.groovy @@ -112,10 +112,8 @@ muleDeploy { environment 'DEV' applicationName { baseAppName 'the-app' - prefix 'AVI' - suffix 'xxx' - usePrefix false - useSuffix false + prefix '' + suffix '' } appVersion '1.2.3' file '${builtFile}' @@ -176,10 +174,8 @@ muleDeploy { environment 'DEV' applicationName { baseAppName 'the-app' - prefix 'AVI' - suffix 'xxx' - usePrefix false - useSuffix false + prefix '' + suffix '' } appVersion '1.2.3' file '${builtFile}' @@ -238,8 +234,6 @@ muleDeploy { baseAppName 'the-app' prefix 'AVI' suffix 'xxx' - usePrefix false - useSuffix false } appVersion '1.2.3' file '${builtFile}' @@ -292,8 +286,6 @@ muleDeploy { baseAppName 'the-app' prefix 'AVI' suffix 'xxx' - usePrefix true - useSuffix false } appVersion '1.2.3' workerSpecs { @@ -391,8 +383,6 @@ muleDeploy { baseAppName 'the-app' prefix 'AVI' suffix 'xxx' - usePrefix false - useSuffix false } appVersion '1.2.3' file '${builtFile}' diff --git a/library/examples/allOptions.groovy b/library/examples/allOptions.groovy index 68c99228..ca39142b 100644 --- a/library/examples/allOptions.groovy +++ b/library/examples/allOptions.groovy @@ -82,8 +82,6 @@ muleDeploy { environment 'DEV' applicationName { baseAppName 'the-app' - usePrefix true - useSuffix true prefix params.env suffix params.env } @@ -96,8 +94,6 @@ muleDeploy { environment 'DEV' applicationName { baseAppName 'the-app' - usePrefix true - useSuffix true prefix params.env suffix params.env } diff --git a/library/src/main/java/com/avioconsulting/mule/deployment/api/models/deployment/ApplicationName.groovy b/library/src/main/java/com/avioconsulting/mule/deployment/api/models/deployment/ApplicationName.groovy index 45b8ca8e..f52a7cfa 100644 --- a/library/src/main/java/com/avioconsulting/mule/deployment/api/models/deployment/ApplicationName.groovy +++ b/library/src/main/java/com/avioconsulting/mule/deployment/api/models/deployment/ApplicationName.groovy @@ -11,10 +11,10 @@ class ApplicationName { private static final String EMPTY_STRING='' private static final MAX_SIZE_APPLICATION_NAME = 42 - ApplicationName(String baseAppName, Boolean usePrefix, Boolean useSuffix, String prefix, String suffix) { + ApplicationName(String baseAppName, String prefix, String suffix) { this.baseAppName = baseAppName - this.usePrefix = usePrefix - this.useSuffix = useSuffix + this.usePrefix = prefix != null && !prefix.isBlank() + this.useSuffix = suffix != null && !suffix.isBlank() this.prefix = prefix this.suffix = suffix // getNormalizedAppName() diff --git a/library/src/main/java/com/avioconsulting/mule/deployment/api/models/deployment/FileBasedAppDeploymentRequest.groovy b/library/src/main/java/com/avioconsulting/mule/deployment/api/models/deployment/FileBasedAppDeploymentRequest.groovy index 45dcad35..38431761 100644 --- a/library/src/main/java/com/avioconsulting/mule/deployment/api/models/deployment/FileBasedAppDeploymentRequest.groovy +++ b/library/src/main/java/com/avioconsulting/mule/deployment/api/models/deployment/FileBasedAppDeploymentRequest.groovy @@ -32,7 +32,7 @@ abstract class FileBasedAppDeploymentRequest extends AppDeploymentRequest { // Properties are not passed then extract the artifactId and version from the pom.xml if(!applicationName) { - setAppName(new ApplicationName(this.parsedPomProperties.artifactId,false,false,null,null)) + setAppName(new ApplicationName(this.parsedPomProperties.artifactId, null, null)) } if(!appVersion) { setAppVersion(parsedPomProperties.version) diff --git a/library/src/main/java/com/avioconsulting/mule/deployment/dsl/ApplicationNameContext.groovy b/library/src/main/java/com/avioconsulting/mule/deployment/dsl/ApplicationNameContext.groovy index 8d22c0cd..e1556f13 100644 --- a/library/src/main/java/com/avioconsulting/mule/deployment/dsl/ApplicationNameContext.groovy +++ b/library/src/main/java/com/avioconsulting/mule/deployment/dsl/ApplicationNameContext.groovy @@ -5,14 +5,12 @@ import com.avioconsulting.mule.deployment.api.models.deployment.ApplicationName class ApplicationNameContext extends BaseContext{ String baseAppName - Boolean usePrefix - Boolean useSuffix String prefix String suffix ApplicationName createApplicationName(){ - return new ApplicationName(baseAppName,usePrefix,useSuffix,prefix,suffix) + return new ApplicationName(baseAppName, prefix, suffix) } @Override diff --git a/library/src/main/resources/evaluate.gdsl.vm b/library/src/main/resources/evaluate.gdsl.vm index eba85a83..55bd3140 100644 --- a/library/src/main/resources/evaluate.gdsl.vm +++ b/library/src/main/resources/evaluate.gdsl.vm @@ -213,8 +213,6 @@ contributor([closureScopeContext]) { call = enclosingCall('applicationName') if (call) { #stringParam('baseAppName') - #boolParam('usePrefix') - #boolParam('useSuffix') #stringParam('prefix') #stringParam('suffix') #stringParam('normalizedAppName') diff --git a/library/src/test/java/com/avioconsulting/mule/deployment/DeployerTest.groovy b/library/src/test/java/com/avioconsulting/mule/deployment/DeployerTest.groovy index 3a8e7b82..ac8734eb 100644 --- a/library/src/test/java/com/avioconsulting/mule/deployment/DeployerTest.groovy +++ b/library/src/test/java/com/avioconsulting/mule/deployment/DeployerTest.groovy @@ -186,7 +186,7 @@ class DeployerTest { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('new-app',true,true,'client','DEV'), + new ApplicationName('new-app', 'client', 'DEV'), '1.2.3',) def apiSpec = new ApiSpecification('Hello API', simpleRamlFiles) @@ -216,7 +216,7 @@ class DeployerTest { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('new-app-mule3',true,true,'client','DEV'), + new ApplicationName('new-app-mule3', 'client', 'DEV'), '1.2.3') def apiSpec = new ApiSpecification('Hello API', simpleRamlFiles, @@ -297,7 +297,7 @@ class DeployerTest { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('new-app-mule4',true,true,'client','DEV'), + new ApplicationName('new-app-mule4', 'client', 'DEV'), '1.2.3') def apiSpec = new ApiSpecification('Hello API', simpleRamlFiles, @@ -334,7 +334,7 @@ class DeployerTest { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('new-app',true,true,'client','DEV'), + new ApplicationName('new-app', 'client', 'DEV'), '1.2.3') def apiSpec = new ApiSpecification('Hello API', simpleRamlFiles) @@ -360,7 +360,7 @@ class DeployerTest { def request = new OnPremDeploymentRequest('DEV', 'clustera', file, - new ApplicationName('new-app-mule3',false,false,null,null), + new ApplicationName('new-app-mule3', null, null), '1.2.3') // act @@ -391,7 +391,7 @@ class DeployerTest { def request = new OnPremDeploymentRequest('DEV', 'clustera', file, - new ApplicationName('new-app-mule4',true,true,'client','DEV'), + new ApplicationName('new-app-mule4', 'client', 'DEV'), '1.2.3') // act @@ -427,7 +427,7 @@ class DeployerTest { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('new-app',true,true,'client','DEV'), + new ApplicationName('new-app', 'client', 'DEV'), '1.2.3') // act @@ -462,7 +462,7 @@ class DeployerTest { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('new-app',true,true,'client','DEV'), + new ApplicationName('new-app', 'client', 'DEV'), '1.2.3') def apiSpec = new ApiSpecification('Hello API', simpleRamlFiles) @@ -498,7 +498,7 @@ class DeployerTest { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('new-app',true,true,'client','DEV'), + new ApplicationName('new-app', 'client', 'DEV'), '1.2.3') def apiSpec = new ApiSpecification('Hello API', simpleRamlFiles) @@ -534,7 +534,7 @@ class DeployerTest { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('new-app',true,true,'client','DEV'), + new ApplicationName('new-app', 'client', 'DEV'), '1.2.3') def apiSpec = new ApiSpecification('Hello SOAP API', 'v1') @@ -568,7 +568,7 @@ class DeployerTest { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('new-app-mule4',true,true,'client','DEV'), + new ApplicationName('new-app-mule4', 'client', 'DEV'), '1.2.3') def apiSpec1 = new ApiSpecification('Hello API v1', simpleRamlFiles) diff --git a/library/src/test/java/com/avioconsulting/mule/deployment/api/models/ApplicationNameTest.groovy b/library/src/test/java/com/avioconsulting/mule/deployment/api/models/ApplicationNameTest.groovy index 27fd9e75..a3991513 100644 --- a/library/src/test/java/com/avioconsulting/mule/deployment/api/models/ApplicationNameTest.groovy +++ b/library/src/test/java/com/avioconsulting/mule/deployment/api/models/ApplicationNameTest.groovy @@ -13,7 +13,7 @@ class ApplicationNameTest { // arrange // act - def name = (new ApplicationName('avio-consulting', true, true, 'app-prefix', 'app-suffix')).normalizedAppName + def name = (new ApplicationName('avio-consulting', 'app-prefix', 'app-suffix')).normalizedAppName // assert assert name == 'app-prefix-avio-consulting-app-suffix' } @@ -24,7 +24,7 @@ class ApplicationNameTest { // act def exception = shouldFail { - (new ApplicationName('avio consulting', true, true, 'app-prefix', 'app-suffix')).normalizedAppName + (new ApplicationName('avio consulting', 'app-prefix', 'app-suffix')).normalizedAppName } // assert MatcherAssert.assertThat('fail', exception.message.contains("Name must be alphanumeric with dashes allowed within")) @@ -36,7 +36,7 @@ class ApplicationNameTest { // act def exception = shouldFail { - (new ApplicationName(null, false, false, null, null)).normalizedAppName + (new ApplicationName(null, null, null)).normalizedAppName } // assert MatcherAssert.assertThat('fail', exception.message.contains("Name must be alphanumeric with dashes allowed within")) @@ -48,7 +48,7 @@ class ApplicationNameTest { // act def exception = shouldFail { - (new ApplicationName('-avio-consulting', true, true, 'app-prefix', 'app-suffix')).normalizedAppName + (new ApplicationName('-avio-consulting', 'app-prefix', 'app-suffix')).normalizedAppName } // assert MatcherAssert.assertThat('fail', exception.message.contains("Name must be alphanumeric with dashes allowed within")) @@ -60,7 +60,7 @@ class ApplicationNameTest { // act def exception = shouldFail { - (new ApplicationName('avio-consulting-', true, true, 'app-prefix', 'app-suffix')).normalizedAppName + (new ApplicationName('avio-consulting-', 'app-prefix', 'app-suffix')).normalizedAppName } // assert MatcherAssert.assertThat('fail', exception.message.contains("Name must be alphanumeric with dashes allowed within")) @@ -72,7 +72,7 @@ class ApplicationNameTest { // act def exception = shouldFail { - (new ApplicationName('avio-consulting', true, true, 'app@prefix', 'app-suffix')).normalizedAppName + (new ApplicationName('avio-consulting', 'app@prefix', 'app-suffix')).normalizedAppName } // assert MatcherAssert.assertThat('fail', exception.message.contains("Prefix must be alphanumeric with dashes allowed within")) @@ -84,7 +84,7 @@ class ApplicationNameTest { // act def exception = shouldFail { - (new ApplicationName('avio-consulting', true, true, 'app-prefix', 'app$suffix')).normalizedAppName + (new ApplicationName('avio-consulting', 'app-prefix', 'app$suffix')).normalizedAppName } // assert MatcherAssert.assertThat('fail', exception.message.contains("Suffix must be alphanumeric with dashes allowed within")) diff --git a/library/src/test/java/com/avioconsulting/mule/deployment/api/models/CloudhubDeploymentRequestTest.groovy b/library/src/test/java/com/avioconsulting/mule/deployment/api/models/CloudhubDeploymentRequestTest.groovy index 0ef3d8ae..3cf87f67 100644 --- a/library/src/test/java/com/avioconsulting/mule/deployment/api/models/CloudhubDeploymentRequestTest.groovy +++ b/library/src/test/java/com/avioconsulting/mule/deployment/api/models/CloudhubDeploymentRequestTest.groovy @@ -31,7 +31,7 @@ class CloudhubDeploymentRequestTest implements MavenInvoke { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('new-app',true,false,'client',null), + new ApplicationName('new-app', 'client', null), '1.2.3') // assert @@ -56,7 +56,7 @@ class CloudhubDeploymentRequestTest implements MavenInvoke { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('mule-deploy-lib-v4-test-app',true,true,'client','DEV') + new ApplicationName('mule-deploy-lib-v4-test-app', 'client', 'DEV') ) // assert @@ -86,7 +86,7 @@ class CloudhubDeploymentRequestTest implements MavenInvoke { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('new-app',true,false,'client',null)) + new ApplicationName('new-app', 'client', null)) // assert assertThat 'app.runtime in the POM', @@ -106,7 +106,7 @@ class CloudhubDeploymentRequestTest implements MavenInvoke { // act def exception = shouldFail { - (new ApplicationName('some app name',true,false,'client',null)).normalizedAppName + (new ApplicationName('some app name', 'client', null)).normalizedAppName } // assert MatcherAssert.assertThat('fail', exception.message.contains("Name must be alphanumeric with dashes allowed within")) @@ -122,7 +122,7 @@ class CloudhubDeploymentRequestTest implements MavenInvoke { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('mule-deploy-lib-v4-test-app',true,true,'client','DEV'),) + new ApplicationName('mule-deploy-lib-v4-test-app', 'client', 'DEV'),) // act def appInfo = request.getCloudhubAppInfo() @@ -168,7 +168,7 @@ class CloudhubDeploymentRequestTest implements MavenInvoke { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('mule-deploy-lib-v4-test-app',true,true,'client','DEV'), + new ApplicationName('mule-deploy-lib-v4-test-app', 'client', 'DEV'), null, [prop1: 'foo', prop2: 'bar']) @@ -220,7 +220,7 @@ class CloudhubDeploymentRequestTest implements MavenInvoke { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('mule-deploy-lib-v4-test-app',true,true,'client','dev') + new ApplicationName('mule-deploy-lib-v4-test-app', 'client', 'dev') ) // act @@ -270,7 +270,7 @@ class CloudhubDeploymentRequestTest implements MavenInvoke { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('mule-deploy-lib-v4-test-app',true,true,'client','dev'), + new ApplicationName('mule-deploy-lib-v4-test-app', 'client', 'dev'), null, [:], otherProperties) @@ -318,7 +318,7 @@ class CloudhubDeploymentRequestTest implements MavenInvoke { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('mule-deploy-lib-v4-test-app',true,true,'client','dev'), + new ApplicationName('mule-deploy-lib-v4-test-app', 'client', 'dev'), null, [:], otherProperties) @@ -370,7 +370,7 @@ class CloudhubDeploymentRequestTest implements MavenInvoke { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('mule-deploy-lib-v4-test-app',true,true,'client','dev'), + new ApplicationName('mule-deploy-lib-v4-test-app', 'client', 'dev'), null, [prop1: 'foo', prop2: 'bar'], otherProperties) @@ -417,7 +417,7 @@ class CloudhubDeploymentRequestTest implements MavenInvoke { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('NEW-APP',true,true,'client','dev'), + new ApplicationName('NEW-APP', 'client', 'dev'), '1.2.3') // act @@ -469,7 +469,7 @@ class CloudhubDeploymentRequestTest implements MavenInvoke { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('mule-deploy-lib-v4-test-app',true,true,'client','dev'), + new ApplicationName('mule-deploy-lib-v4-test-app', 'client', 'dev'), null, [:], [:], @@ -513,7 +513,7 @@ class CloudhubDeploymentRequestTest implements MavenInvoke { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('mule-deploy-lib-v4-test-app',true,true,'client','dev'), + new ApplicationName('mule-deploy-lib-v4-test-app', 'client', 'dev'), '1.2.3') // act diff --git a/library/src/test/java/com/avioconsulting/mule/deployment/api/models/CloudhubV2DeploymentRequestTest.groovy b/library/src/test/java/com/avioconsulting/mule/deployment/api/models/CloudhubV2DeploymentRequestTest.groovy index 20bd4053..50692664 100644 --- a/library/src/test/java/com/avioconsulting/mule/deployment/api/models/CloudhubV2DeploymentRequestTest.groovy +++ b/library/src/test/java/com/avioconsulting/mule/deployment/api/models/CloudhubV2DeploymentRequestTest.groovy @@ -32,7 +32,7 @@ class CloudhubV2DeploymentRequestTest implements MavenInvoke { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('new-app',true,false,'prefix',null), + new ApplicationName('new-app', 'prefix', null), '1.2.3', 'f2ea2cb4-c600-4bb5-88e8-e952ff5591ee') @@ -63,7 +63,7 @@ class CloudhubV2DeploymentRequestTest implements MavenInvoke { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('some app name', true, false, 'client', null), + new ApplicationName('some app name', 'client', null), '4.2.2', 'f2ea2cb4-c600-4bb5-88e8-e952ff5591ee') } @@ -83,7 +83,7 @@ class CloudhubV2DeploymentRequestTest implements MavenInvoke { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('new-app',false,false,null,null), + new ApplicationName('new-app', null, null), '2.2.9', 'f2ea2cb4-c600-4bb5-88e8-e952ff5591ee') @@ -154,7 +154,7 @@ class CloudhubV2DeploymentRequestTest implements MavenInvoke { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('new-app',true,false,'prefix',null), + new ApplicationName('new-app', 'prefix', null), '1.2.3', 'new-group-id') @@ -213,8 +213,7 @@ class CloudhubV2DeploymentRequestTest implements MavenInvoke { /** * This case validates that the name of application to deploy is not larger that the maximum required of 42 characters. * however, this validation happens after build the final appName (normalizedAppName) like this: ${cloudhubAppprefix}-${appName}-${env} length should not larger than 42 characters. - * example: ApplicationName{ baseName=myVeryVeryVeryLargeApplicationName, usePrefix=true, useSuffix=true, prefix=someprefix, suffix=prod -> someprefix-myVeryVeryLargeApplicationName-prod is larger than 42 characters, it's not a valid name - * ${usePrefix} could be false so: myVeryVeryVeryLargeApplicationName-prod is a valid name + * example: ApplicationName{ baseName=myVeryVeryVeryLargeApplicationName, prefix=someprefix, suffix=prod -> someprefix-myVeryVeryLargeApplicationName-prod is larger than 42 characters, it's not a valid name */ @Test void test_deploymentRequest_appName_should_not_larger_than_required() { @@ -228,7 +227,7 @@ class CloudhubV2DeploymentRequestTest implements MavenInvoke { 'theKey', 'theClientId', 'theSecret', - new ApplicationName(appName,true,true, prefix, environment), + new ApplicationName(appName, prefix, environment), '4.2.2', 'f2ea2cb4-c600-4bb5-88e8-e952ff5591ee') } @@ -248,7 +247,7 @@ class CloudhubV2DeploymentRequestTest implements MavenInvoke { 'theKey', 'theClientId', 'theSecret', - new ApplicationName(appName, false, false, null, null), + new ApplicationName(appName, null, null), '4.2.2', 'f2ea2cb4-c600-4bb5-88e8-e952ff5591ee') } diff --git a/library/src/test/java/com/avioconsulting/mule/deployment/api/models/OnPremDeploymentRequestTest.groovy b/library/src/test/java/com/avioconsulting/mule/deployment/api/models/OnPremDeploymentRequestTest.groovy index 94fbe6b7..35fcb7a1 100644 --- a/library/src/test/java/com/avioconsulting/mule/deployment/api/models/OnPremDeploymentRequestTest.groovy +++ b/library/src/test/java/com/avioconsulting/mule/deployment/api/models/OnPremDeploymentRequestTest.groovy @@ -28,7 +28,7 @@ class OnPremDeploymentRequestTest implements MavenInvoke { def request = new OnPremDeploymentRequest('DEV', 'clustera', file, - new ApplicationName('some-app-name',false,false,null,null), + new ApplicationName('some-app-name', null, null), '1.2.3') // assert @@ -46,7 +46,7 @@ class OnPremDeploymentRequestTest implements MavenInvoke { def request = new OnPremDeploymentRequest('DEV', 'clustera', builtFile, - new ApplicationName('mule-deploy-lib-v4-test-app',false,false,null,null),) + new ApplicationName('mule-deploy-lib-v4-test-app', null, null),) // assert request.with { @@ -64,7 +64,7 @@ class OnPremDeploymentRequestTest implements MavenInvoke { // act def exception = shouldFail { - (new ApplicationName('some app name',false,false,null,null)).normalizedAppName + (new ApplicationName('some app name', null, null)).normalizedAppName } // assert diff --git a/library/src/test/java/com/avioconsulting/mule/deployment/api/models/RuntimeFabricDeploymentRequestTest.groovy b/library/src/test/java/com/avioconsulting/mule/deployment/api/models/RuntimeFabricDeploymentRequestTest.groovy index 75aeab3d..c0c6c083 100644 --- a/library/src/test/java/com/avioconsulting/mule/deployment/api/models/RuntimeFabricDeploymentRequestTest.groovy +++ b/library/src/test/java/com/avioconsulting/mule/deployment/api/models/RuntimeFabricDeploymentRequestTest.groovy @@ -28,7 +28,7 @@ class RuntimeFabricDeploymentRequestTest implements MavenInvoke { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('new-app',true,false,'prefix',null), + new ApplicationName('new-app','prefix',null), '1.2.3', 'f2ea2cb4-c600-4bb5-88e8-e952ff5591ee') @@ -54,7 +54,7 @@ class RuntimeFabricDeploymentRequestTest implements MavenInvoke { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('new-app',true,false,'prefix',null), + new ApplicationName('new-app','prefix',null), '2.2.9', 'f2ea2cb4-c600-4bb5-88e8-e952ff5591ee') @@ -87,7 +87,7 @@ class RuntimeFabricDeploymentRequestTest implements MavenInvoke { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('some app name',true,false,'prefix','DEV'), + new ApplicationName('some app name','prefix','DEV'), '1.2.3', 'f2ea2cb4-c600-4bb5-88e8-e952ff5591ee') } @@ -102,7 +102,7 @@ class RuntimeFabricDeploymentRequestTest implements MavenInvoke { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('new-app',false,true,null,'DEV'), + new ApplicationName('new-app',null,'DEV'), '2.2.9', 'f2ea2cb4-c600-4bb5-88e8-e952ff5591ee') @@ -182,7 +182,7 @@ class RuntimeFabricDeploymentRequestTest implements MavenInvoke { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('new-app',true,true,'prefix','DEV'), + new ApplicationName('new-app','prefix','DEV'), '1.2.3', 'new-group-id') diff --git a/library/src/test/java/com/avioconsulting/mule/deployment/dsl/CloudhubContextTest.groovy b/library/src/test/java/com/avioconsulting/mule/deployment/dsl/CloudhubContextTest.groovy index 12fa6d10..0798f9c2 100644 --- a/library/src/test/java/com/avioconsulting/mule/deployment/dsl/CloudhubContextTest.groovy +++ b/library/src/test/java/com/avioconsulting/mule/deployment/dsl/CloudhubContextTest.groovy @@ -138,10 +138,7 @@ class CloudhubContextTest implements MavenInvoke { } applicationName { baseAppName 'the-app' - usePrefix true - useSuffix false prefix 'AVI' - suffix 'dev' } analyticsAgentEnabled false file builtFile.absolutePath @@ -320,8 +317,6 @@ class CloudhubContextTest implements MavenInvoke { environment 'DEV' applicationName { baseAppName 'the-app' - usePrefix true - useSuffix false prefix 'AVI' } appVersion '1.2.3' diff --git a/library/src/test/java/com/avioconsulting/mule/deployment/dsl/CloudhubV2ContextTest.groovy b/library/src/test/java/com/avioconsulting/mule/deployment/dsl/CloudhubV2ContextTest.groovy index 20ed56b2..b02e8ffc 100644 --- a/library/src/test/java/com/avioconsulting/mule/deployment/dsl/CloudhubV2ContextTest.groovy +++ b/library/src/test/java/com/avioconsulting/mule/deployment/dsl/CloudhubV2ContextTest.groovy @@ -35,8 +35,6 @@ class CloudhubV2ContextTest implements MavenInvoke { appVersion '2.2.9' applicationName { baseAppName 'the-app' - usePrefix true - useSuffix true prefix 'AVI' suffix 'dev' } @@ -125,9 +123,6 @@ class CloudhubV2ContextTest implements MavenInvoke { environment 'DEV' applicationName { baseAppName 'the-app' - usePrefix true - useSuffix false - prefix 'AVI' suffix 'dev' } appVersion '2.2.9' @@ -169,7 +164,7 @@ class CloudhubV2ContextTest implements MavenInvoke { assertThat anypointClientSecret, is(equalTo('the_client_secret')) assertThat applicationName.normalizedAppName, - is(equalTo('avi-the-app')) + is(equalTo('the-app-dev')) workerSpecRequest.with { assertThat target, is(equalTo('target_name')) diff --git a/library/src/test/java/com/avioconsulting/mule/deployment/dsl/MuleDeployContextTest.groovy b/library/src/test/java/com/avioconsulting/mule/deployment/dsl/MuleDeployContextTest.groovy index 748e64ba..dc6981a6 100644 --- a/library/src/test/java/com/avioconsulting/mule/deployment/dsl/MuleDeployContextTest.groovy +++ b/library/src/test/java/com/avioconsulting/mule/deployment/dsl/MuleDeployContextTest.groovy @@ -43,8 +43,6 @@ class MuleDeployContextTest implements AppBuilding { environment 'DEV' applicationName { baseAppName 'the-app' - usePrefix true - useSuffix true prefix 'AVI' suffix 'dev' } @@ -98,8 +96,6 @@ class MuleDeployContextTest implements AppBuilding { environment 'DEV' applicationName { baseAppName 'the-app' - usePrefix true - useSuffix true prefix 'AVI' suffix 'dev' } @@ -141,8 +137,6 @@ class MuleDeployContextTest implements AppBuilding { environment 'DEV' applicationName { baseAppName 'the-app' - usePrefix true - useSuffix true prefix 'AVI' suffix 'dev' } @@ -192,8 +186,6 @@ class MuleDeployContextTest implements AppBuilding { environment 'DEV' applicationName { baseAppName 'the-app' - usePrefix true - useSuffix true prefix 'AVI' suffix 'dev' } @@ -280,8 +272,6 @@ class MuleDeployContextTest implements AppBuilding { environment 'DEV' applicationName { baseAppName 'the-app' - usePrefix true - useSuffix true prefix 'AVI' suffix 'dev' } @@ -294,8 +284,6 @@ class MuleDeployContextTest implements AppBuilding { environment 'DEV' applicationName { baseAppName 'the-app' - usePrefix true - useSuffix true prefix 'AVI' suffix 'dev' } @@ -342,8 +330,6 @@ class MuleDeployContextTest implements AppBuilding { environment 'DEV' applicationName { baseAppName 'the-app' - usePrefix true - useSuffix true prefix 'AVI' suffix 'dev' } @@ -356,8 +342,6 @@ class MuleDeployContextTest implements AppBuilding { environment 'DEV' applicationName { baseAppName 'the-app' - usePrefix true - useSuffix true prefix 'AVI' suffix 'dev' } @@ -403,8 +387,6 @@ class MuleDeployContextTest implements AppBuilding { environment 'DEV' applicationName { baseAppName 'the-app' - usePrefix true - useSuffix true prefix 'AVI' suffix 'dev' } @@ -417,8 +399,6 @@ class MuleDeployContextTest implements AppBuilding { environment 'DEV' applicationName { baseAppName 'the-app' - usePrefix true - useSuffix true prefix 'AVI' suffix 'dev' } @@ -479,8 +459,6 @@ class MuleDeployContextTest implements AppBuilding { environment 'DEV' applicationName { baseAppName 'the-app' - usePrefix true - useSuffix true prefix 'AVI' suffix 'dev' } @@ -527,8 +505,6 @@ class MuleDeployContextTest implements AppBuilding { environment 'DEV' applicationName { baseAppName 'the-app' - usePrefix true - useSuffix true prefix 'AVI' suffix 'dev' } @@ -572,8 +548,6 @@ class MuleDeployContextTest implements AppBuilding { environment 'DEV' applicationName { baseAppName 'the-app' - usePrefix true - useSuffix false prefix 'AVI' suffix 'dev' } @@ -614,8 +588,6 @@ class MuleDeployContextTest implements AppBuilding { environment 'DEV' applicationName { baseAppName 'the-app' - usePrefix true - useSuffix true prefix 'AVI' suffix 'dev' } @@ -658,8 +630,6 @@ class MuleDeployContextTest implements AppBuilding { environment 'DEV' applicationName { baseAppName 'the-app' - usePrefix true - useSuffix true prefix 'AVI' suffix 'dev' } diff --git a/library/src/test/java/com/avioconsulting/mule/deployment/dsl/OnPremContextTest.groovy b/library/src/test/java/com/avioconsulting/mule/deployment/dsl/OnPremContextTest.groovy index ae4bc82a..0c8caf28 100644 --- a/library/src/test/java/com/avioconsulting/mule/deployment/dsl/OnPremContextTest.groovy +++ b/library/src/test/java/com/avioconsulting/mule/deployment/dsl/OnPremContextTest.groovy @@ -27,8 +27,6 @@ class OnPremContextTest implements MavenInvoke { targetServerOrClusterName 'server1' applicationName { baseAppName 'the-app' - usePrefix true - useSuffix true prefix 'AVI' suffix 'dev' } @@ -62,10 +60,7 @@ class OnPremContextTest implements MavenInvoke { environment 'DEV' applicationName { baseAppName 'the-app' - usePrefix true - useSuffix false prefix 'AVI' - suffix 'dev' } appVersion '1.2.3' file 'path/to/file.jar' diff --git a/library/src/test/java/com/avioconsulting/mule/deployment/dsl/RuntimeFabricContextTest.groovy b/library/src/test/java/com/avioconsulting/mule/deployment/dsl/RuntimeFabricContextTest.groovy index 7fe7f407..badfa7a1 100644 --- a/library/src/test/java/com/avioconsulting/mule/deployment/dsl/RuntimeFabricContextTest.groovy +++ b/library/src/test/java/com/avioconsulting/mule/deployment/dsl/RuntimeFabricContextTest.groovy @@ -36,8 +36,6 @@ class RuntimeFabricContextTest implements MavenInvoke { appVersion '2.2.9' applicationName { baseAppName 'the-app' - usePrefix true - useSuffix true prefix 'AVI' suffix 'dev' } @@ -126,10 +124,8 @@ class RuntimeFabricContextTest implements MavenInvoke { environment 'DEV' applicationName { baseAppName 'the-app' - usePrefix false - useSuffix false - prefix 'AVI' - suffix 'dev' + prefix '' + suffix '' } appVersion '2.2.9' cryptoKey 'theKey' diff --git a/library/src/test/java/com/avioconsulting/mule/deployment/internal/TestFileBasedRequest.groovy b/library/src/test/java/com/avioconsulting/mule/deployment/internal/TestFileBasedRequest.groovy index 837c0741..11ac7691 100644 --- a/library/src/test/java/com/avioconsulting/mule/deployment/internal/TestFileBasedRequest.groovy +++ b/library/src/test/java/com/avioconsulting/mule/deployment/internal/TestFileBasedRequest.groovy @@ -7,7 +7,7 @@ class TestFileBasedRequest extends FileBasedAppDeploymentRequest { private final File zipFile TestFileBasedRequest(File zipFile, String appName, String appVersion, String environment) { - super(zipFile, new ApplicationName(appName,false,false,null,null), appVersion, environment) + super(zipFile, new ApplicationName(appName, null, null), appVersion, environment) this.zipFile = zipFile } diff --git a/library/src/test/java/com/avioconsulting/mule/deployment/internal/subdeployers/CloudHubDeployerTest.groovy b/library/src/test/java/com/avioconsulting/mule/deployment/internal/subdeployers/CloudHubDeployerTest.groovy index 8623b01f..65aa4f20 100644 --- a/library/src/test/java/com/avioconsulting/mule/deployment/internal/subdeployers/CloudHubDeployerTest.groovy +++ b/library/src/test/java/com/avioconsulting/mule/deployment/internal/subdeployers/CloudHubDeployerTest.groovy @@ -113,7 +113,7 @@ class CloudHubDeployerTest extends BaseTest { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('sys-new-app',true,true,'client','DEV'), + new ApplicationName('sys-new-app', 'client', 'DEV'), '1.2.3') request.setAutoDiscoveryId('the.auto.disc.prop', '1234') @@ -220,7 +220,7 @@ class CloudHubDeployerTest extends BaseTest { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('new-app',true,true,'client','DEV'), + new ApplicationName('new-app', 'client', 'DEV'), '1.2.3') // act @@ -305,7 +305,7 @@ class CloudHubDeployerTest extends BaseTest { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('new-app',true,true,'client','DEV'), + new ApplicationName('new-app', 'client', 'DEV'), '1.2.3') // act @@ -353,7 +353,7 @@ class CloudHubDeployerTest extends BaseTest { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('new-app',true,true,'client','DEV'), + new ApplicationName('new-app', 'client', 'DEV'), '1.2.3') // act @@ -399,7 +399,7 @@ class CloudHubDeployerTest extends BaseTest { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('new-app',true,true,'client','DEV'), + new ApplicationName('new-app', 'client', 'DEV'), '1.2.3') // act @@ -447,7 +447,7 @@ class CloudHubDeployerTest extends BaseTest { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('new-app',true,true,'client','DEV'), + new ApplicationName('new-app', 'client', 'DEV'), '1.2.3') // act @@ -510,7 +510,7 @@ class CloudHubDeployerTest extends BaseTest { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('new-app',true,true,'client','DEV'), + new ApplicationName('new-app', 'client', 'DEV'), '1.2.3') // act @@ -573,7 +573,7 @@ class CloudHubDeployerTest extends BaseTest { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('new-app',true,true,'client','DEV'), + new ApplicationName('new-app', 'client', 'DEV'), '1.2.3') // act @@ -639,7 +639,7 @@ class CloudHubDeployerTest extends BaseTest { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('new-app',true,true,'client','DEV'), + new ApplicationName('new-app', 'client', 'DEV'), '1.2.3') // act @@ -736,7 +736,7 @@ class CloudHubDeployerTest extends BaseTest { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('new-app',true,true,'client','DEV'), + new ApplicationName('new-app', 'client', 'DEV'), '1.2.3') // act @@ -784,7 +784,7 @@ class CloudHubDeployerTest extends BaseTest { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('new-app',true,true,'client','DEV'), + new ApplicationName('new-app', 'client', 'DEV'), '1.2.3') // act @@ -842,7 +842,7 @@ class CloudHubDeployerTest extends BaseTest { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('new-app',true,true,'client','DEV'), + new ApplicationName('new-app', 'client', 'DEV'), '1.2.3') // act @@ -888,7 +888,7 @@ class CloudHubDeployerTest extends BaseTest { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('new-app',true,true,'client','DEV'), + new ApplicationName('new-app', 'client', 'DEV'), '1.2.3') // act @@ -942,7 +942,7 @@ class CloudHubDeployerTest extends BaseTest { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('new-app',true,true,'client','DEV'), + new ApplicationName('new-app', 'client', 'DEV'), '1.2.3') // act @@ -995,7 +995,7 @@ class CloudHubDeployerTest extends BaseTest { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('new-app',true,true,'client','DEV'), + new ApplicationName('new-app', 'client', 'DEV'), '1.2.3',) // act deployer.deploy(request) @@ -1090,7 +1090,7 @@ class CloudHubDeployerTest extends BaseTest { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('new-app',true,false,'client',null), + new ApplicationName('new-app', 'client', null), '1.2.3') // act @@ -1115,7 +1115,7 @@ class CloudHubDeployerTest extends BaseTest { 'theKey', 'theClientId', 'theSecret', - new ApplicationName('new-app',true,false,'client',null), + new ApplicationName('new-app', 'client', null), '1.2.3') // act diff --git a/library/src/test/java/com/avioconsulting/mule/deployment/internal/subdeployers/CloudHubV2DeployerTest.groovy b/library/src/test/java/com/avioconsulting/mule/deployment/internal/subdeployers/CloudHubV2DeployerTest.groovy index 9ca9ca82..8c811b77 100644 --- a/library/src/test/java/com/avioconsulting/mule/deployment/internal/subdeployers/CloudHubV2DeployerTest.groovy +++ b/library/src/test/java/com/avioconsulting/mule/deployment/internal/subdeployers/CloudHubV2DeployerTest.groovy @@ -93,7 +93,7 @@ class CloudHubV2DeployerTest extends RuntimeFabricDeployerTest implements MavenI 'theKey', 'theClientId', 'theSecret', - new ApplicationName("new-app",false,true,null,ENV), + new ApplicationName("new-app", null, ENV), APP_VERSION, GROUP_ID) @@ -162,7 +162,7 @@ class CloudHubV2DeployerTest extends RuntimeFabricDeployerTest implements MavenI 'theKey', 'theClientId', 'theSecret', - new ApplicationName("new-app",false,false,null,null), + new ApplicationName("new-app", null, null), APP_VERSION, GROUP_ID) @@ -230,7 +230,7 @@ class CloudHubV2DeployerTest extends RuntimeFabricDeployerTest implements MavenI 'theKey', 'theClientId', 'theSecret', - new ApplicationName(APP_NAME,false,true,null,ENV), + new ApplicationName(APP_NAME, null, ENV), APP_VERSION, GROUP_ID) @@ -299,7 +299,7 @@ class CloudHubV2DeployerTest extends RuntimeFabricDeployerTest implements MavenI 'theKey', 'theClientId', 'theSecret', - new ApplicationName(APP_NAME,false,true,null,ENV), + new ApplicationName(APP_NAME, null, ENV), APP_VERSION, GROUP_ID) @@ -342,7 +342,7 @@ class CloudHubV2DeployerTest extends RuntimeFabricDeployerTest implements MavenI 'theKey', 'theClientId', 'theSecret', - new ApplicationName(APP_NAME,false,true,null,ENV), + new ApplicationName(APP_NAME, null, ENV), APP_VERSION, GROUP_ID) @@ -388,7 +388,7 @@ class CloudHubV2DeployerTest extends RuntimeFabricDeployerTest implements MavenI 'theKey', 'theClientId', 'theSecret', - new ApplicationName(APP_NAME,false,true,null,ENV), + new ApplicationName(APP_NAME, null, ENV), APP_VERSION, GROUP_ID) @@ -434,7 +434,7 @@ class CloudHubV2DeployerTest extends RuntimeFabricDeployerTest implements MavenI 'theKey', 'theClientId', 'theSecret', - new ApplicationName(APP_NAME,false,true,null,ENV), + new ApplicationName(APP_NAME, null, ENV), APP_VERSION, GROUP_ID) diff --git a/library/src/test/java/com/avioconsulting/mule/deployment/internal/subdeployers/OnPremDeployerTest.groovy b/library/src/test/java/com/avioconsulting/mule/deployment/internal/subdeployers/OnPremDeployerTest.groovy index 40f537ed..6ce67e19 100644 --- a/library/src/test/java/com/avioconsulting/mule/deployment/internal/subdeployers/OnPremDeployerTest.groovy +++ b/library/src/test/java/com/avioconsulting/mule/deployment/internal/subdeployers/OnPremDeployerTest.groovy @@ -247,7 +247,7 @@ class OnPremDeployerTest extends BaseTest { // act deployer.locateApplication('DEV', - new ApplicationName('the-app',false,false,null,null)) + new ApplicationName('the-app', null, null)) // assert assertThat url, @@ -293,7 +293,7 @@ class OnPremDeployerTest extends BaseTest { // act def appId = deployer.locateApplication('DEV', - new ApplicationName('non-existent-app',false,false,null,null)) + new ApplicationName('non-existent-app', null, null)) // assert assertThat 'app not being there is not an exception', @@ -332,7 +332,7 @@ class OnPremDeployerTest extends BaseTest { // act def appId = deployer.locateApplication('DEV', - new ApplicationName('the-app',false,false,null,null)) + new ApplicationName('the-app', null, null)) // assert assertThat appId, @@ -427,7 +427,7 @@ class OnPremDeployerTest extends BaseTest { def request = new OnPremDeploymentRequest('DEV', 'clustera', file, - new ApplicationName('new-app',false,false,null,null), + new ApplicationName('new-app', null, null), '1.2.3') // act @@ -538,7 +538,7 @@ class OnPremDeployerTest extends BaseTest { def request = new OnPremDeploymentRequest('DEV', 'clustera', file, - new ApplicationName('new-app',false,false,null,null), + new ApplicationName('new-app', null, null), '1.2.3') request.setAutoDiscoveryId('the.auto.disc.prop', '1234') @@ -647,7 +647,7 @@ class OnPremDeployerTest extends BaseTest { def request = new OnPremDeploymentRequest('DEV', 'clustera', file, - new ApplicationName('new-app',false,false,null,null), + new ApplicationName('new-app', null, null), '1.2.3', [prop1: 'foo', prop2: 'bar']) @@ -774,7 +774,7 @@ class OnPremDeployerTest extends BaseTest { def request = new OnPremDeploymentRequest('DEV', 'clustera', file, - new ApplicationName('the-app',false,false,null,null), + new ApplicationName('the-app', null, null), '1.2.3') // act @@ -893,7 +893,7 @@ class OnPremDeployerTest extends BaseTest { def request = new OnPremDeploymentRequest('DEV', 'clustera', file, - new ApplicationName('the-app',false,false,null,null), + new ApplicationName('the-app', null, null), '1.2.3', [prop1: 'foo', prop2: 'bar']) @@ -1324,7 +1324,7 @@ class OnPremDeployerTest extends BaseTest { def request = new OnPremDeploymentRequest('DEV', 'clustera', file, - new ApplicationName('new-app',false,false,null,null), + new ApplicationName('new-app', null, null), '1.2.3') // act @@ -1371,7 +1371,7 @@ class OnPremDeployerTest extends BaseTest { def request = new OnPremDeploymentRequest('DEV', 'clustera', file, - new ApplicationName('new-app',false,false,null,null), + new ApplicationName('new-app', null, null), '1.2.3') // act @@ -1408,7 +1408,7 @@ class OnPremDeployerTest extends BaseTest { def request = new OnPremDeploymentRequest('DEV', 'clustera', file, - new ApplicationName('new-app',false,false,null,null), + new ApplicationName('new-app', null, null), '1.2.3') // act @@ -1451,7 +1451,7 @@ class OnPremDeployerTest extends BaseTest { def request = new OnPremDeploymentRequest('DEV', 'clustera', file, - new ApplicationName('new-app',false,false,null,null), + new ApplicationName('new-app', null, null), '1.2.3') // act @@ -1471,7 +1471,7 @@ class OnPremDeployerTest extends BaseTest { def request = new OnPremDeploymentRequest('DEV', 'clustera', file, - new ApplicationName('new-app',false,false,null,null), + new ApplicationName('new-app', null, null), '1.2.3') // act @@ -1489,7 +1489,7 @@ class OnPremDeployerTest extends BaseTest { def request = new OnPremDeploymentRequest('DEV', 'clustera', file, - new ApplicationName('new-app',false,false,null,null), + new ApplicationName('new-app', null, null), '1.2.3') // act @@ -1577,7 +1577,7 @@ class OnPremDeployerTest extends BaseTest { def request = new OnPremDeploymentRequest('DEV', 'clustera', file, - new ApplicationName('new-app',false,false,null,null), + new ApplicationName('new-app', null, null), '1.2.3') // act deployer.deploy(request) diff --git a/library/src/test/java/com/avioconsulting/mule/deployment/internal/subdeployers/RuntimeFabricDeployerTest.groovy b/library/src/test/java/com/avioconsulting/mule/deployment/internal/subdeployers/RuntimeFabricDeployerTest.groovy index 7e6bc521..bd06e7e2 100644 --- a/library/src/test/java/com/avioconsulting/mule/deployment/internal/subdeployers/RuntimeFabricDeployerTest.groovy +++ b/library/src/test/java/com/avioconsulting/mule/deployment/internal/subdeployers/RuntimeFabricDeployerTest.groovy @@ -107,7 +107,7 @@ class RuntimeFabricDeployerTest extends BaseTest implements MavenInvoke { 'theKey', 'theClientId', 'theSecret', - new ApplicationName(APP_NAME,false,true,null,'dev'), + new ApplicationName(APP_NAME, null, 'dev'), APP_VERSION, GROUP_ID) @@ -175,7 +175,7 @@ class RuntimeFabricDeployerTest extends BaseTest implements MavenInvoke { 'theKey', 'theClientId', 'theSecret', - new ApplicationName(APP_NAME,false,false,null,null), + new ApplicationName(APP_NAME, null, null), APP_VERSION, GROUP_ID) @@ -244,7 +244,7 @@ class RuntimeFabricDeployerTest extends BaseTest implements MavenInvoke { 'theKey', 'theClientId', 'theSecret', - new ApplicationName(APP_NAME,false,true,null,'dev'), + new ApplicationName(APP_NAME, null, 'dev'), APP_VERSION, GROUP_ID) @@ -313,7 +313,7 @@ class RuntimeFabricDeployerTest extends BaseTest implements MavenInvoke { 'theKey', 'theClientId', 'theSecret', - new ApplicationName(APP_NAME,false,true,null,'dev'), + new ApplicationName(APP_NAME, null, 'dev'), APP_VERSION, GROUP_ID) @@ -356,7 +356,7 @@ class RuntimeFabricDeployerTest extends BaseTest implements MavenInvoke { 'theKey', 'theClientId', 'theSecret', - new ApplicationName(APP_NAME,false,false,null,null), + new ApplicationName(APP_NAME, null, null), APP_VERSION, GROUP_ID) @@ -402,7 +402,7 @@ class RuntimeFabricDeployerTest extends BaseTest implements MavenInvoke { 'theKey', 'theClientId', 'theSecret', - new ApplicationName(APP_NAME,true,false,'client',null), + new ApplicationName(APP_NAME, 'client', null), APP_VERSION, GROUP_ID) @@ -448,7 +448,7 @@ class RuntimeFabricDeployerTest extends BaseTest implements MavenInvoke { 'theKey', 'theClientId', 'theSecret', - new ApplicationName(APP_NAME,true,false,'client',null), + new ApplicationName(APP_NAME, 'client', null), APP_VERSION, GROUP_ID) diff --git a/library/src/test/java/com/avioconsulting/mule/integrationtest/CloudHubV2IntegrationTest.groovy b/library/src/test/java/com/avioconsulting/mule/integrationtest/CloudHubV2IntegrationTest.groovy index 3721f8fe..3f6023f5 100644 --- a/library/src/test/java/com/avioconsulting/mule/integrationtest/CloudHubV2IntegrationTest.groovy +++ b/library/src/test/java/com/avioconsulting/mule/integrationtest/CloudHubV2IntegrationTest.groovy @@ -175,7 +175,7 @@ class CloudHubV2IntegrationTest { null, ANYPOINT_CLIENT_ID, ANYPOINT_CLIENT_SECRET, - new ApplicationName(APP_NAME, false, true, 'AVI', 'dev'), + new ApplicationName(APP_NAME, 'AVI', 'dev'), APP_VERSION, GROUP_ID, null, @@ -199,7 +199,7 @@ class CloudHubV2IntegrationTest { null, ANYPOINT_CLIENT_ID, ANYPOINT_CLIENT_SECRET, - new ApplicationName(APP_NAME, false, true, 'AVI', 'dev'), + new ApplicationName(APP_NAME, 'AVI', 'dev'), APP_VERSION, GROUP_ID, null, @@ -228,7 +228,7 @@ class CloudHubV2IntegrationTest { null , ANYPOINT_CLIENT_ID, ANYPOINT_CLIENT_SECRET, - new ApplicationName(APP_NAME, false, true, 'AVI', 'dev'), + new ApplicationName(APP_NAME, 'AVI', 'dev'), APP_VERSION, GROUP_ID, null, diff --git a/library/src/test/java/com/avioconsulting/mule/integrationtest/IntegrationTest.groovy b/library/src/test/java/com/avioconsulting/mule/integrationtest/IntegrationTest.groovy index 532d30cf..372a8a7d 100644 --- a/library/src/test/java/com/avioconsulting/mule/integrationtest/IntegrationTest.groovy +++ b/library/src/test/java/com/avioconsulting/mule/integrationtest/IntegrationTest.groovy @@ -89,7 +89,7 @@ class IntegrationTest implements MavenInvoke { 'abcdefg', ANYPOINT_CLIENT_ID, ANYPOINT_CLIENT_SECRET, - new ApplicationName(null, false, false, '', ''), + new ApplicationName(null, '', ''), null, [:]) def logger = new TestConsoleLogger() diff --git a/maven-plugin/src/test/java/com/avioconsulting/mule/maven/MuleDeployMojoTest.groovy b/maven-plugin/src/test/java/com/avioconsulting/mule/maven/MuleDeployMojoTest.groovy index 05208955..7fad61f0 100644 --- a/maven-plugin/src/test/java/com/avioconsulting/mule/maven/MuleDeployMojoTest.groovy +++ b/maven-plugin/src/test/java/com/avioconsulting/mule/maven/MuleDeployMojoTest.groovy @@ -74,8 +74,6 @@ muleDeploy { baseAppName 'the-app' prefix 'AVI' suffix 'xxx' - usePrefix false - useSuffix false } appVersion '1.2.3' file '${builtFile}' @@ -155,8 +153,6 @@ muleDeploy { baseAppName 'the-app' prefix 'AVI' suffix 'xxx' - usePrefix false - useSuffix false } appVersion '1.2.3' file '${builtFile}' @@ -258,10 +254,8 @@ muleDeploy { environment 'DEV' applicationName { baseAppName 'the-app' - prefix 'AVI' - suffix 'xxx' - usePrefix false - useSuffix false + prefix '' + suffix '' } appVersion '1.2.3' file '${builtFile}' @@ -324,8 +318,6 @@ muleDeploy { baseAppName 'the-app' prefix 'AVI' suffix 'xxx' - usePrefix false - useSuffix false } appVersion '1.2.3' file '${builtFile}' @@ -380,8 +372,6 @@ muleDeploy { baseAppName 'the-app' prefix 'AVI' suffix 'xxx' - usePrefix false - useSuffix false } appVersion '1.2.3' file '${builtFile}' @@ -441,8 +431,6 @@ muleDeploy { baseAppName 'the-app' prefix 'AVI' suffix 'xxx' - usePrefix false - useSuffix false } appVersion '1.2.3' workerSpecs { @@ -529,8 +517,6 @@ muleDeploy { baseAppName 'the-app' prefix 'AVI' suffix 'xxx' - usePrefix false - useSuffix false } appVersion '1.2.3' file '${builtFile}' @@ -588,8 +574,6 @@ muleDeploy { baseAppName 'the-app' prefix 'AVI' suffix 'xxx' - usePrefix false - useSuffix false } appVersion '1.2.3' file '${builtFile}' diff --git a/maven-plugin/src/test/java/com/avioconsulting/mule/maven/ValidateMojoTest.groovy b/maven-plugin/src/test/java/com/avioconsulting/mule/maven/ValidateMojoTest.groovy index fb635c9b..079a945b 100644 --- a/maven-plugin/src/test/java/com/avioconsulting/mule/maven/ValidateMojoTest.groovy +++ b/maven-plugin/src/test/java/com/avioconsulting/mule/maven/ValidateMojoTest.groovy @@ -67,8 +67,6 @@ muleDeploy { baseAppName 'the-app' prefix 'AVI' suffix 'xxx' - usePrefix false - useSuffix false } appVersion '1.2.3' file '${builtFile}' @@ -98,8 +96,6 @@ muleDeploy { baseAppName 'the-app' prefix 'AVI' suffix 'xxx' - usePrefix false - useSuffix false } appVersion '1.2.3' file '${builtFile}' @@ -147,8 +143,6 @@ muleDeploy { baseAppName 'the-app' prefix 'AVI' suffix 'xxx' - usePrefix false - useSuffix false } appVersion versionsForEnvironments[params.env] file '${builtFile}'