fix e2e upgrade config migration (#2179)

This commit is contained in:
Adrian Stobbe 2023-08-09 10:28:13 +02:00 committed by GitHub
parent 81a13319b7
commit d1febd7276
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 12 deletions

View file

@ -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))