From c1f3eb867b3f2e6275bc2c6e2e922c421997709f Mon Sep 17 00:00:00 2001 From: Navid Shaikh Date: Mon, 2 Mar 2020 14:17:52 +0530 Subject: [PATCH] fix(e2e): Update revision e2e tests (#696) Fixes #695 - Re-order revision tests operations to avoid any race condition that may cause. --- test/e2e/revision_test.go | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/test/e2e/revision_test.go b/test/e2e/revision_test.go index 45a7a9ee3..bd0290c78 100644 --- a/test/e2e/revision_test.go +++ b/test/e2e/revision_test.go @@ -45,27 +45,25 @@ func TestRevision(t *testing.T) { revName := test.findRevision(t, r, "hello") test.revisionDescribeWithPrintFlags(t, r, revName) - t.Log("update hello service and increase the count of configuration generation") + t.Log("update hello service and increase revision count to 2") test.serviceUpdate(t, r, "hello", "--env", "TARGET=kn", "--port", "8888") t.Log("show a list of revisions sorted by the count of configuration generation") test.revisionListWithService(t, r, "hello") - t.Log("delete latest revision from hello service and return no error") - revName = test.findRevision(t, r, "hello") - test.revisionDelete(t, r, revName) - - t.Log("delete three revisions with one revision a nonexistent") - - // increase count to 2 revisions + t.Log("update hello service and increase revision count to 3") test.serviceUpdate(t, r, "hello", "--env", "TARGET=kn", "--port", "8888") + t.Log("delete three revisions with one revision a nonexistent") existRevision1 := test.findRevisionByGeneration(t, r, "hello", 1) existRevision2 := test.findRevisionByGeneration(t, r, "hello", 2) nonexistRevision := "hello-nonexist" - test.revisionMultipleDelete(t, r, existRevision1, existRevision2, nonexistRevision) + t.Log("delete latest revision from hello service and return no error") + revName = test.findRevision(t, r, "hello") + test.revisionDelete(t, r, revName) + t.Log("delete hello service and return no error") test.serviceDelete(t, r, "hello") }