mirror of https://github.com/knative/client.git
fix(e2e): Let the subscription and related resource reconcile (#1044)
sleep for 5 seconds after subscription create and update in e2e
This commit is contained in:
parent
adb3793b98
commit
aa6c4ad22a
|
|
@ -17,6 +17,8 @@ limitations under the License.
|
||||||
package test
|
package test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"time"
|
||||||
|
|
||||||
"gotest.tools/assert"
|
"gotest.tools/assert"
|
||||||
|
|
||||||
"knative.dev/client/pkg/util"
|
"knative.dev/client/pkg/util"
|
||||||
|
|
@ -28,6 +30,8 @@ func SubscriptionCreate(r *KnRunResultCollector, sname string, args ...string) {
|
||||||
out := r.KnTest().Kn().Run(cmd...)
|
out := r.KnTest().Kn().Run(cmd...)
|
||||||
r.AssertNoError(out)
|
r.AssertNoError(out)
|
||||||
assert.Check(r.T(), util.ContainsAllIgnoreCase(out.Stdout, "subscription", sname, "created"))
|
assert.Check(r.T(), util.ContainsAllIgnoreCase(out.Stdout, "subscription", sname, "created"))
|
||||||
|
// let the subscription and related resource reconcile
|
||||||
|
time.Sleep(time.Second * 5)
|
||||||
}
|
}
|
||||||
|
|
||||||
func SubscriptionList(r *KnRunResultCollector, args ...string) string {
|
func SubscriptionList(r *KnRunResultCollector, args ...string) string {
|
||||||
|
|
@ -58,4 +62,6 @@ func SubscriptionUpdate(r *KnRunResultCollector, sname string, args ...string) {
|
||||||
out := r.KnTest().Kn().Run(cmd...)
|
out := r.KnTest().Kn().Run(cmd...)
|
||||||
r.AssertNoError(out)
|
r.AssertNoError(out)
|
||||||
assert.Check(r.T(), util.ContainsAllIgnoreCase(out.Stdout, "subscription", sname, "updated"))
|
assert.Check(r.T(), util.ContainsAllIgnoreCase(out.Stdout, "subscription", sname, "updated"))
|
||||||
|
// let the subscription and related resource reconcile
|
||||||
|
time.Sleep(time.Second * 5)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue