mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-31 03:54:21 -04:00
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:
parent
3942cf27f3
commit
90dbeae16b
9 changed files with 55 additions and 108 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue