Skip to content

Commit

Permalink
Adds 10 seconds sleep between service create and revision delete
Browse files Browse the repository at this point in the history
 Also adds check for 'No resources found' while grabbing revision name.
  • Loading branch information
navidshaikh committed Jun 26, 2019
1 parent 3432262 commit 65b194a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/e2e/revision_workflow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,18 @@ package e2e

import (
"fmt"
"strings"
"testing"
"time"
)

func TestRevisionWorkflow(t *testing.T) {
teardown := Setup(t)
defer teardown(t)

testServiceCreate(t, k, "hello")
// TODO: remove this when https://github.com/knative/client/pull/156 is merged
time.Sleep(10 * time.Second)
testDeleteRevision(t, k, "hello")
testServiceDelete(t, k, "hello")
}
Expand All @@ -35,6 +39,9 @@ func testDeleteRevision(t *testing.T, k kn, serviceName string) {
if err != nil {
t.Errorf("Error executing 'revision list -o' command. Error: %s", err.Error())
}
if strings.Contains(revName, "No resources found.") {
t.Errorf("Could not find revision name.")
}
out, err := k.RunWithOpts([]string{"revision", "delete", revName}, runOpts{})
if err != nil {
t.Errorf("Error executing 'revision delete %s' command. Error: %s", revName, err.Error())
Expand Down

0 comments on commit 65b194a

Please sign in to comment.