cli: fix duplicate backup creation during upgrade apply (#1997)

* Use CLI to fetch measurements in e2e test

* Abort helm service upgrade early if user confirmation is missing

* Add container push to CLI build action

---------

Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
Daniel Weiße 2023-07-03 15:13:36 +02:00 committed by GitHub
parent 3942cf27f3
commit 90dbeae16b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 55 additions and 108 deletions

View file

@ -60,22 +60,11 @@ func TestShouldUpgrade(t *testing.T) {
func TestUpgradeRelease(t *testing.T) {
testCases := map[string]struct {
allowDestructive bool
version string
assertCorrectError func(t *testing.T, err error) bool
wantError bool
version string
wantError bool
}{
"allow": {
allowDestructive: true,
version: "1.9.0",
},
"deny": {
allowDestructive: false,
version: "1.9.0",
assertCorrectError: func(t *testing.T, err error) bool {
return assert.ErrorIs(t, err, ErrConfirmationMissing)
},
wantError: true,
version: "1.9.0",
},
}
@ -88,9 +77,9 @@ func TestUpgradeRelease(t *testing.T) {
chart, err := loadChartsDir(helmFS, certManagerInfo.path)
require.NoError(err)
err = client.upgradeRelease(context.Background(), 0, config.Default(), chart, tc.allowDestructive)
err = client.upgradeRelease(context.Background(), 0, config.Default(), chart)
if tc.wantError {
tc.assertCorrectError(t, err)
assert.Error(err)
return
}
assert.NoError(err)