Skip to content

Commit 0085d86

Browse files
committed
cleanup
1 parent 23a0e1a commit 0085d86

File tree

2 files changed

+20
-10
lines changed

2 files changed

+20
-10
lines changed

build-tools-internal/src/integTest/groovy/org/elasticsearch/gradle/internal/transport/AbstractTransportVersionFuncTest.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class AbstractTransportVersionFuncTest extends AbstractGradleFuncTest {
110110

111111
def setup() {
112112
configurationCacheCompatible = false
113-
internalBuild([], "9.2.0", ["9.1": "9.1.1", "9.0": "9.0.2", "8.19": "8.19.7"])
113+
internalBuild()
114114
settingsFile << """
115115
include ':myserver'
116116
include ':myplugin'

build-tools/src/testFixtures/groovy/org/elasticsearch/gradle/fixtures/AbstractGradleFuncTest.groovy

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,13 @@ abstract class AbstractGradleFuncTest extends Specification {
172172

173173
File internalBuild(
174174
List<String> extraPlugins = [],
175-
String currentVersion = "9.0.0",
176-
Map<String, String> backportVersionsByBranch =
177-
["8.x": "8.4.0", "8.3": "8.3.0", "8.2": "8.2.1", "8.1": "8.1.3", "7.16": "7.16.10"]
175+
String maintenance = "7.16.10",
176+
String major4 = "8.1.3",
177+
String major3 = "8.2.1",
178+
String major2 = "8.3.0",
179+
String major1 = "8.4.0",
180+
String current = "9.0.0"
178181
) {
179-
Collection<String> backportVersions = backportVersionsByBranch.values()
180182
buildFile << """plugins {
181183
id 'elasticsearch.global-build-info'
182184
${extraPlugins.collect { p -> "id '$p'" }.join('\n')}
@@ -187,15 +189,23 @@ abstract class AbstractGradleFuncTest extends Specification {
187189
import org.elasticsearch.gradle.internal.info.DevelopmentBranch
188190
import org.elasticsearch.gradle.Version
189191
190-
Version currentVersion = Version.fromString("${currentVersion}")
192+
Version currentVersion = Version.fromString("${current}")
191193
def versionList = [
192-
${backportVersions.collect {"Version.fromString(\"${ it }\")," }.join(System.lineSeparator())}
193-
currentVersion
194+
Version.fromString("$maintenance"),
195+
Version.fromString("$major4"),
196+
Version.fromString("$major3"),
197+
Version.fromString("$major2"),
198+
Version.fromString("$major1"),
199+
currentVersion
194200
]
195201
196202
BwcVersions versions = new BwcVersions(currentVersion, versionList, [
197-
new DevelopmentBranch('main', currentVersion),
198-
${backportVersionsByBranch.collect {"new DevelopmentBranch('${ it.key }', Version.fromString(\"${ it.value }\"))," }.join(System.lineSeparator())}
203+
new DevelopmentBranch('main', Version.fromString("$current")),
204+
new DevelopmentBranch('8.x', Version.fromString("$major1")),
205+
new DevelopmentBranch('8.3', Version.fromString("$major2")),
206+
new DevelopmentBranch('8.2', Version.fromString("$major3")),
207+
new DevelopmentBranch('8.1', Version.fromString("$major4")),
208+
new DevelopmentBranch('7.16', Version.fromString("$maintenance")),
199209
])
200210
buildParams.setBwcVersions(project.provider { versions } )
201211
"""

0 commit comments

Comments
 (0)