Skip to content

Commit

Permalink
fix: add missing download CLI tool URL response for ppc64le, s390x (#…
Browse files Browse the repository at this point in the history
…9983)

Signed-off-by: Hyeonmin Park <[email protected]>
  • Loading branch information
KENNYSOFT authored and crenshaw-dev committed Jul 15, 2022
1 parent d3d4906 commit aafb6ce
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion util/settings/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -1239,7 +1239,7 @@ func (mgr *SettingsManager) ensureSynced(forceResync bool) error {

func getDownloadBinaryUrlsFromConfigMap(argoCDCM *apiv1.ConfigMap) map[string]string {
binaryUrls := map[string]string{}
for _, archType := range []string{"darwin-amd64", "darwin-arm64", "windows-amd64", "linux-arm64", "linux-amd64"} {
for _, archType := range []string{"darwin-amd64", "darwin-arm64", "windows-amd64", "linux-amd64", "linux-arm64", "linux-ppc64le", "linux-s390x"} {
if val, ok := argoCDCM.Data[settingsBinaryUrlsKey+"."+archType]; ok {
binaryUrls[archType] = val
}
Expand Down
10 changes: 9 additions & 1 deletion util/settings/settings_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -668,11 +668,12 @@ func TestSettingsManager_GetHelp(t *testing.T) {
t.Run("GetBinaryUrls", func(t *testing.T) {
_, settingsManager := fixtures(map[string]string{
"help.download.darwin-amd64": "amd64-path",
"help.download.linux-s390x": "s390x-path",
"help.download.unsupported": "nowhere",
})
h, err := settingsManager.GetHelp()
assert.NoError(t, err)
assert.Equal(t, map[string]string{"darwin-amd64": "amd64-path"}, h.BinaryURLs)
assert.Equal(t, map[string]string{"darwin-amd64": "amd64-path", "linux-s390x": "s390x-path"}, h.BinaryURLs)
})
}

Expand Down Expand Up @@ -986,6 +987,13 @@ func TestDownloadArgoCDBinaryUrls(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, "some-url", argoCDCM.Data["help.download.darwin-amd64"])

_, settingsManager = fixtures(map[string]string{
"help.download.linux-s390x": "some-url",
})
argoCDCM, err = settingsManager.getConfigMap()
assert.NoError(t, err)
assert.Equal(t, "some-url", argoCDCM.Data["help.download.linux-s390x"])

_, settingsManager = fixtures(map[string]string{
"help.download.unsupported": "some-url",
})
Expand Down

0 comments on commit aafb6ce

Please sign in to comment.