Guard distro tests for pre oss in distribution filesnames (#45478)

Before #45064, the bats tests skipped the upgrade tests when the random
upgrade version is before 6.3.0. This commit restores that behavior.

closes #45476
This commit is contained in:
Ryan Ernst 2019-08-13 00:13:20 -07:00 committed by GitHub
parent 1aed388a24
commit 488673f636
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -182,8 +182,12 @@ public class DistroTestPlugin implements Plugin<Project> {
try {
Files.writeString(archivesPath.resolve("version"), VersionProperties.getElasticsearch());
Files.writeString(archivesPath.resolve("upgrade_from_version"), upgradeFromVersion);
Path upgradeMarkerPath = archivesPath.resolve("upgrade_is_oss");
project.delete(upgradeMarkerPath);
// this is always true, but bats tests rely on it. It is just temporary until bats is removed.
Files.writeString(archivesPath.resolve("upgrade_is_oss"), "");
if (upgradeVersion.onOrAfter("6.3.0")) {
Files.writeString(upgradeMarkerPath, "");
}
} catch (IOException e) {
throw new UncheckedIOException(e);
}