Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rjernst committed Oct 16, 2023
1 parent 55f263d commit 0f19fb5
Showing 1 changed file with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ private static String[] pluginProperties(String name, String[] additionalProps,
"version",
"1.0",
"elasticsearch.version",
InstallPluginAction.getSemanticVersion(Build.current().version()),
Build.current().version(),
"java.version",
System.getProperty("java.specification.version")

Expand Down Expand Up @@ -1110,8 +1110,8 @@ public void testOfficialPluginSnapshot() throws Exception {
String url = String.format(
Locale.ROOT,
"https://snapshots.elastic.co/%s-abc123/downloads/elasticsearch-plugins/analysis-icu/analysis-icu-%s.zip",
InstallPluginAction.getSemanticVersion(Build.current().version()),
Build.current().version()
Build.current().version(),
Build.current().qualifiedVersion()
);
assertInstallPluginFromUrl("analysis-icu", url, "abc123", true);
}
Expand All @@ -1120,8 +1120,8 @@ public void testInstallReleaseBuildOfPluginOnSnapshotBuild() {
String url = String.format(
Locale.ROOT,
"https://snapshots.elastic.co/%s-abc123/downloads/elasticsearch-plugins/analysis-icu/analysis-icu-%s.zip",
InstallPluginAction.getSemanticVersion(Build.current().version()),
Build.current().version()
Build.current().version(),
Build.current().qualifiedVersion()
);
// attempting to install a release build of a plugin (no staging ID) on a snapshot build should throw a user exception
final UserException e = expectThrows(
Expand All @@ -1137,9 +1137,9 @@ public void testInstallReleaseBuildOfPluginOnSnapshotBuild() {

public void testOfficialPluginStaging() throws Exception {
String url = "https://staging.elastic.co/"
+ InstallPluginAction.getSemanticVersion(Build.current().version())
+ "-abc123/downloads/elasticsearch-plugins/analysis-icu/analysis-icu-"
+ Build.current().version()
+ "-abc123/downloads/elasticsearch-plugins/analysis-icu/analysis-icu-"
+ Build.current().qualifiedVersion()
+ ".zip";
assertInstallPluginFromUrl("analysis-icu", url, "abc123", false);
}
Expand All @@ -1148,7 +1148,7 @@ public void testOfficialPlatformPlugin() throws Exception {
String url = "https://artifacts.elastic.co/downloads/elasticsearch-plugins/analysis-icu/analysis-icu-"
+ Platforms.PLATFORM_NAME
+ "-"
+ Build.current().version()
+ Build.current().qualifiedVersion()
+ ".zip";
assertInstallPluginFromUrl("analysis-icu", url, null, false);
}
Expand All @@ -1157,16 +1157,16 @@ public void testOfficialPlatformPluginSnapshot() throws Exception {
String url = String.format(
Locale.ROOT,
"https://snapshots.elastic.co/%s-abc123/downloads/elasticsearch-plugins/analysis-icu/analysis-icu-%s-%s.zip",
InstallPluginAction.getSemanticVersion(Build.current().version()),
Build.current().version(),
Platforms.PLATFORM_NAME,
Build.current().version()
Build.current().qualifiedVersion()
);
assertInstallPluginFromUrl("analysis-icu", url, "abc123", true);
}

public void testOfficialPlatformPluginStaging() throws Exception {
String url = "https://staging.elastic.co/"
+ InstallPluginAction.getSemanticVersion(Build.current().version())
+ Build.current().version()
+ "-abc123/downloads/elasticsearch-plugins/analysis-icu/analysis-icu-"
+ Platforms.PLATFORM_NAME
+ "-"
Expand Down

0 comments on commit 0f19fb5

Please sign in to comment.