add control plane check before running proxy test assertion (#1836)

This PR adds a check before the TestCheckProxy executes the CLI command to make sure the control plane has installed all its pods. This avoids the situation where the test would fail because the pods are retrying the data plane check. The PR's base is #1835 but will switch to master once that PR merges.

Relates to PR #1835
Fixes #1733

Signed-off-by: Dennis Adjei-Baah <dennis@buoyant.io>
This commit is contained in:
Dennis Adjei-Baah 2018-11-02 13:30:06 -07:00 committed by GitHub
parent 747fd328e9
commit 1c79f0146c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 21 additions and 9 deletions

View File

@ -131,7 +131,12 @@ func TestCheckPostInstall(t *testing.T) {
var out string var out string
var err error var err error
overallErr := TestHelper.RetryFor(30*time.Second, func() error { overallErr := TestHelper.RetryFor(30*time.Second, func() error {
out, _, err = TestHelper.LinkerdRun("check", "--expected-version", TestHelper.GetVersion()) out, _, err = TestHelper.LinkerdRun(
"check",
"--expected-version",
TestHelper.GetVersion(),
"--wait=0",
)
return err return err
}) })
if overallErr != nil { if overallErr != nil {
@ -220,14 +225,21 @@ func TestInject(t *testing.T) {
func TestCheckProxy(t *testing.T) { func TestCheckProxy(t *testing.T) {
prefixedNs := TestHelper.GetTestNamespace("smoke-test") prefixedNs := TestHelper.GetTestNamespace("smoke-test")
out, _, err := TestHelper.LinkerdRun( var out string
"check", err := TestHelper.RetryFor(2*time.Minute, func() error {
"--proxy", var err error
"--expected-version", out, _, err = TestHelper.LinkerdRun(
TestHelper.GetVersion(), "check",
"--namespace", "--proxy",
prefixedNs, "--expected-version",
) TestHelper.GetVersion(),
"--namespace",
prefixedNs,
"--wait=0",
)
return err
})
if err != nil { if err != nil {
t.Fatalf("Check command failed\n%s", out) t.Fatalf("Check command failed\n%s", out)
} }