From d1febd7276d264ddbfe7f1c350212ef19f130667 Mon Sep 17 00:00:00 2001 From: Adrian Stobbe Date: Wed, 9 Aug 2023 10:28:13 +0200 Subject: [PATCH] fix e2e upgrade config migration (#2179) --- .github/workflows/e2e-upgrade.yml | 7 ++++--- e2e/internal/upgrade/upgrade_test.go | 11 ++--------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/workflows/e2e-upgrade.yml b/.github/workflows/e2e-upgrade.yml index 6cbf1b42f..614b3a71c 100644 --- a/.github/workflows/e2e-upgrade.yml +++ b/.github/workflows/e2e-upgrade.yml @@ -183,9 +183,10 @@ jobs: uses: ./.github/actions/login_azure with: azure_credentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }} - - - ## IAM upgrade + - name: Migrate config + id: constellation-config-migrate + run: | + ./build/constellation config migrate --debug - name: Upgrade IAM configuration id: constellation-iam-upgrade uses: ./.github/actions/constellation_iam_upgrade diff --git a/e2e/internal/upgrade/upgrade_test.go b/e2e/internal/upgrade/upgrade_test.go index 409257d00..823523de3 100644 --- a/e2e/internal/upgrade/upgrade_test.go +++ b/e2e/internal/upgrade/upgrade_test.go @@ -78,18 +78,11 @@ func TestUpgrade(t *testing.T) { cli, err := getCLIPath(*cliPath) require.NoError(err) - // Migrate config if necessary. - log.Println("Migrating config if needed.") - cmd := exec.CommandContext(context.Background(), cli, "config", "migrate", "--debug") - stdout, stderr, err := runCommandWithSeparateOutputs(cmd) - require.NoError(err, "Stdout: %s\nStderr: %s", string(stdout), string(stderr)) - log.Println(string(stdout)) - targetVersions := writeUpgradeConfig(require, *targetImage, *targetKubernetes, *targetMicroservices) log.Println("Fetching measurements for new image.") - cmd = exec.CommandContext(context.Background(), cli, "config", "fetch-measurements", "--insecure", "--debug") - stdout, stderr, err = runCommandWithSeparateOutputs(cmd) + cmd := exec.CommandContext(context.Background(), cli, "config", "fetch-measurements", "--insecure", "--debug") + stdout, stderr, err := runCommandWithSeparateOutputs(cmd) require.NoError(err, "Stdout: %s\nStderr: %s", string(stdout), string(stderr)) log.Println(string(stdout))