upgrade: fix 2.6 -> 2.7 migration for 2.7.1 patch (#1649)

* upgrade: fix 2.6 -> 2.7 migration for 2.7.1 patch

Also correctly set microservice version from config.
Previously the key was ignored and microservices were always
tried for an upgrade.

* ci: add simulatedTargetVersion to e2e-upgrade

This allows us to build a CLI that reports the given version during
an upgrade test. With this we can test patch upgrades.

Signed-off-by: Otto Bittner <cobittner@posteo.net>

* ci: e2e-upgrade, case-insensitive string compare

* hack: fix v-prefixing in pseudo-version tool

pre-release versions and release versions behaved differently.
This lead to a duplicate v prefix in the cli's version.

Signed-off-by: Otto Bittner <cobittner@posteo.net>

---------

Signed-off-by: Otto Bittner <cobittner@posteo.net>
Co-authored-by: Otto Bittner <cobittner@posteo.net>
This commit is contained in:
Paul Meyer 2023-05-02 12:56:26 +02:00 committed by GitHub
parent 9bee6fc69c
commit 3a9291499b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 108 additions and 53 deletions

View file

@ -50,7 +50,7 @@ func TestShouldUpgrade(t *testing.T) {
chart, err := loadChartsDir(helmFS, certManagerInfo.path)
require.NoError(err)
err = client.shouldUpgrade(certManagerInfo.releaseName, chart)
err = client.shouldUpgrade(certManagerInfo.releaseName, chart.Metadata.Version)
if tc.wantError {
tc.assertCorrectError(t, err)
return