Skip to content

Commit

Permalink
Fixing plugin installation URL to consume build qualifier (#3193)
Browse files Browse the repository at this point in the history
* Fixing the installation URL to consume build qualifier

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>

* Fixing spotless

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>
(cherry picked from commit ba6dc5d)
  • Loading branch information
saratvemulapalli authored and github-actions[bot] committed May 6, 2022
1 parent 5f19df1 commit 741d229
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,12 @@ private String getOpenSearchUrl(
stagingHash
);
} else {
baseUrl = String.format(Locale.ROOT, "https://artifacts.opensearch.org/releases/plugins/%s/%s", pluginId, version);
baseUrl = String.format(
Locale.ROOT,
"https://artifacts.opensearch.org/releases/plugins/%s/%s",
pluginId,
Build.CURRENT.getQualifiedVersion()
);
}
final String platformUrl = String.format(
Locale.ROOT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,7 @@ public void assertInstallPluginFromUrl(

public void testOfficialPlugin() throws Exception {
String url = "https://artifacts.opensearch.org/releases/plugins/analysis-icu/"
+ Version.CURRENT
+ Build.CURRENT.getQualifiedVersion()
+ "/analysis-icu-"
+ Build.CURRENT.getQualifiedVersion()
+ ".zip";
Expand Down Expand Up @@ -1093,7 +1093,7 @@ public void testOfficialPluginStaging() throws Exception {

public void testOfficialPlatformPlugin() throws Exception {
String url = "https://artifacts.opensearch.org/releases/plugins/analysis-icu/"
+ Version.CURRENT
+ Build.CURRENT.getQualifiedVersion()
+ "/analysis-icu-"
+ Platforms.PLATFORM_NAME
+ "-"
Expand Down Expand Up @@ -1159,7 +1159,7 @@ public void testMavenChecksumWithoutFilename() throws Exception {

public void testOfficialChecksumWithoutFilename() throws Exception {
String url = "https://artifacts.opensearch.org/releases/plugins/analysis-icu/"
+ Version.CURRENT
+ Build.CURRENT.getQualifiedVersion()
+ "/analysis-icu-"
+ Build.CURRENT.getQualifiedVersion()
+ ".zip";
Expand All @@ -1184,7 +1184,7 @@ public void testOfficialChecksumWithoutFilename() throws Exception {

public void testOfficialShaMissing() throws Exception {
String url = "https://artifacts.opensearch.org/releases/plugins/analysis-icu/"
+ Version.CURRENT
+ Build.CURRENT.getQualifiedVersion()
+ "/analysis-icu-"
+ Build.CURRENT.getQualifiedVersion()
+ ".zip";
Expand Down Expand Up @@ -1229,7 +1229,7 @@ public void testMavenShaMissing() throws Exception {

public void testInvalidShaFileMissingFilename() throws Exception {
String url = "https://artifacts.opensearch.org/releases/plugins/analysis-icu/"
+ Version.CURRENT
+ Build.CURRENT.getQualifiedVersion()
+ "/analysis-icu-"
+ Build.CURRENT.getQualifiedVersion()
+ ".zip";
Expand All @@ -1254,7 +1254,7 @@ public void testInvalidShaFileMissingFilename() throws Exception {

public void testInvalidShaFileMismatchFilename() throws Exception {
String url = "https://artifacts.opensearch.org/releases/plugins/analysis-icu/"
+ Version.CURRENT
+ Build.CURRENT.getQualifiedVersion()
+ "/analysis-icu-"
+ Build.CURRENT.getQualifiedVersion()
+ ".zip";
Expand All @@ -1279,7 +1279,7 @@ public void testInvalidShaFileMismatchFilename() throws Exception {

public void testInvalidShaFileContainingExtraLine() throws Exception {
String url = "https://artifacts.opensearch.org/releases/plugins/analysis-icu/"
+ Version.CURRENT
+ Build.CURRENT.getQualifiedVersion()
+ "/analysis-icu-"
+ Build.CURRENT.getQualifiedVersion()
+ ".zip";
Expand All @@ -1304,7 +1304,7 @@ public void testInvalidShaFileContainingExtraLine() throws Exception {

public void testSha512Mismatch() throws Exception {
String url = "https://artifacts.opensearch.org/releases/plugins/analysis-icu/"
+ Version.CURRENT
+ Build.CURRENT.getQualifiedVersion()
+ "/analysis-icu-"
+ Build.CURRENT.getQualifiedVersion()
+ ".zip";
Expand Down Expand Up @@ -1349,7 +1349,7 @@ public void testSha1Mismatch() throws Exception {
public void testPublicKeyIdMismatchToExpectedPublicKeyId() throws Exception {
final String icu = "analysis-icu";
final String url = "https://artifacts.opensearch.org/releases/plugins/analysis-icu/"
+ Version.CURRENT
+ Build.CURRENT.getQualifiedVersion()
+ "/"
+ icu
+ "-"
Expand Down Expand Up @@ -1386,7 +1386,7 @@ public void testPublicKeyIdMismatchToExpectedPublicKeyId() throws Exception {
public void testFailedSignatureVerification() throws Exception {
final String icu = "analysis-icu";
final String url = "https://artifacts.opensearch.org/releases/plugins/analysis-icu/"
+ Version.CURRENT
+ Build.CURRENT.getQualifiedVersion()
+ "/"
+ icu
+ "-"
Expand Down

0 comments on commit 741d229

Please sign in to comment.