Fix upgrade integration test (#4744)

An unappropriate variable reuse resulted in the failure of the test for
upgrading using manifests. This only happened when the upgrade was
retried a second time (when there's a discrepancy in the heartbeat cron
schedule, which is bening).
This commit is contained in:
Alejandro Pedraza 2020-07-09 17:05:40 -05:00 committed by GitHub
parent 212c51acfb
commit e225c46484
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -242,13 +242,13 @@ func TestInstallOrUpgradeCli(t *testing.T) {
// test `linkerd upgrade --from-manifests`
if TestHelper.UpgradeFromVersion() != "" {
resources := []string{"configmaps/" + k8s.ConfigConfigMapName, "configmaps/" + k8s.AddOnsConfigMapName, "secrets/" + k8s.IdentityIssuerSecretName}
args := append([]string{"--namespace", TestHelper.GetLinkerdNamespace(), "get"}, resources...)
args = append(args, "-oyaml")
kubeArgs := append([]string{"--namespace", TestHelper.GetLinkerdNamespace(), "get"}, resources...)
kubeArgs = append(kubeArgs, "-oyaml")
manifests, err := TestHelper.Kubectl("", args...)
manifests, err := TestHelper.Kubectl("", kubeArgs...)
if err != nil {
testutil.AnnotatedFatalf(t, "'kubectl get' command failed",
"'kubectl get' command failed with %s\n%s\n%s", err, manifests, args)
"'kubectl get' command failed with %s\n%s\n%s", err, manifests, kubeArgs)
}
exec = append(exec, "--from-manifests", "-")