mirror of https://github.com/linkerd/linkerd2.git
Fix flakey upgrade integration test (#3329)
The `linkerd upgrade` integration test compares the output from two commands: - `linkerd upgrade control-plane` - `linkerd upgrade control-plane --from-manifests` The output of these commands include the heartbeat cronjob schedule, which is generated based on the current time. Modify the upgrade integration test to retry the manifest comparison one time, assuming that `linkerd upgrade control-plane` should not take more than one minute to execute. Signed-off-by: Andrew Seigner <siggy@buoyant.io>
This commit is contained in:
parent
981f5bc85d
commit
419e9052ff
|
@ -205,7 +205,16 @@ func TestInstallOrUpgradeCli(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if out != upgradeFromManifests {
|
if out != upgradeFromManifests {
|
||||||
t.Fatalf("manifest upgrade differs from k8s upgrade.\nk8s upgrade:\n%s\nmanifest upgrade:\n%s", out, upgradeFromManifests)
|
// retry in case it's just a discrepancy in the heartbeat cron schedule
|
||||||
|
exec := append([]string{cmd}, args...)
|
||||||
|
out, _, err := TestHelper.LinkerdRun(exec...)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("command failed: %v\n%s", exec, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
if out != upgradeFromManifests {
|
||||||
|
t.Fatalf("manifest upgrade differs from k8s upgrade.\nk8s upgrade:\n%s\nmanifest upgrade:\n%s", out, upgradeFromManifests)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue