Skip to content

Commit

Permalink
Test fixes to getDownloadPluginUrlCustomUcUrls for JENKINS_UC_DOWNLOA…
Browse files Browse the repository at this point in the history
…D_URL
  • Loading branch information
nhojpatrick committed Mar 11, 2022
1 parent 43fe1a4 commit a7d7873
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1182,7 +1182,7 @@ public void getDownloadPluginUrlCustomUcUrls() throws IOException {
// lastest version
Plugin plugin = new Plugin("pluginName", "latest", null, null);
assertThat(pluginManager.getPluginDownloadUrl(plugin))
.isEqualTo("https://private-mirror.com/jenkins-updated-center/dynamic-stable-2.319.1/latest/pluginName.hpi");
.isEqualTo("https://private-mirror.com/jenkins-updated-center/download/plugins/pluginName/latest/pluginName.hpi");
},
() -> {
// latest version with resolved version
Expand All @@ -1198,7 +1198,7 @@ public void getDownloadPluginUrlCustomUcUrls() throws IOException {
// experimental version
Plugin plugin = new Plugin("pluginName", "experimental", null, null);
assertThat(pluginManager.getPluginDownloadUrl(plugin))
.isEqualTo("https://private-mirror.com/jenkins-updated-center/experimental/latest/pluginName.hpi");
.isEqualTo("https://private-mirror.com/jenkins-updated-center/download/plugins/pluginName/experimental/pluginName.hpi");
},
() -> {
// experimental version with resolved version
Expand All @@ -1214,13 +1214,13 @@ public void getDownloadPluginUrlCustomUcUrls() throws IOException {
// incremental
Plugin plugin = new Plugin("pluginName", "1.0.0", null, "com.cloudbees.jenkins");
assertThat(pluginManager.getPluginDownloadUrl(plugin))
.isEqualTo("https://private-mirror.com/jenkins-updated-center/incrementals/com/cloudbees/jenkins/pluginName/1.0.0/pluginName-1.0.0.hpi");
.isEqualTo("https://private-mirror.com/jenkins-updated-center/download/plugins/pluginName/1.0.0/pluginName.hpi");
},
() -> {
// explicit url
Plugin plugin = new Plugin("pluginName", "1.0.0", "https://other-mirror.com/plugins/custom-url.hpi", null);
assertThat(pluginManager.getPluginDownloadUrl(plugin))
.isEqualTo("https://other-mirror.com/plugins/custom-url.hpi");
.isEqualTo("https://private-mirror.com/jenkins-updated-center/download/plugins/pluginName/1.0.0/pluginName.hpi");
}
);
}
Expand Down

0 comments on commit a7d7873

Please sign in to comment.