resolve inconsistent order of registries in preference view (#6266)

* resolve inconsistent order of registries in preference view

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* reverse regList on business layer

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* update unit test, add functional test and small refactor

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* update functional tests to use proxy

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

Signed-off-by: anandrkskd <anandrkskd@gmail.com>
This commit is contained in:
Anand Kumar Singh
2022-11-04 03:28:10 +05:30
committed by GitHub
parent 26c1d9be4a
commit 99f4a0dbc6
4 changed files with 33 additions and 10 deletions

View File

@@ -133,6 +133,19 @@ func newPreferenceInfo() (*preferenceInfo, error) {
return nil, err
}
regList := []Registry{}
if c.OdoSettings.RegistryList != nil {
regList = *c.OdoSettings.RegistryList
}
i := 0
j := len(regList) - 1
for i < j {
regList[i], regList[j] = regList[j], regList[i]
i++
j--
}
// TODO: This code block about logging warnings should be removed once users completely shift to odo v3.
// The warning will be printed more than once, and it can be annoying, but it should ensure that the user will change these values.
var requiresChange []string