Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NoGoroutine ¶
type NoGoroutine struct{}
NoGoroutine requires that go f(x, y, z) is not allowed.
func NewNoGoroutine ¶
func NewNoGoroutine() *NoGoroutine
NewNoGoroutine creates and returns a NoGoroutine object.
type NoShort ¶
type NoShort struct{}
NoShort requires that testing.Short() is not allowed.
type NoSleep ¶
type NoSleep struct{}
NoSleep requires that time.Sleep() is not allowed.
type ShortSkip ¶
type ShortSkip struct{}
ShortSkip requires that a test function should have one of these pattern. Pattern 1
func TestA(t *testing.T) { if !testing.Short() { ... } }
Pattern 2
func TestB(t *testing.T) { if testing.Short() { t.Skip("xxx") } ... }
func NewSkipByShort ¶
func NewSkipByShort() *ShortSkip
NewSkipByShort creates and returns a ShortSkip object.
func (*ShortSkip) Check ¶
Check verifies if aNode is a valid t.Skip(). If verification fails lrp creates a new report. There are two examples for valid t.Skip(). case 1:
func Testxxx(t *testing.T) { if !testing.Short() { ... } }
case 2:
func Testxxx(t *testing.T) { if testing.Short() { t.Skip("xxx") } ... }
type SkipIssue ¶
type SkipIssue struct {
// contains filtered or unexported fields
}
SkipIssue requires that a `t.Skip()` call in test function should contain url to a issue. This helps to keep tracking of the issue that causes a test to be skipped. For example, this is a valid call, t.Skip("https://github.com/istio/istio/issues/6012") t.SkipNow() and t.Skipf() are not allowed.
func NewSkipByIssue ¶
func NewSkipByIssue() *SkipIssue
NewSkipByIssue creates and returns a SkipIssue object.
func (*SkipIssue) Check ¶
Check returns verifies if aNode is a valid t.Skip(), or aNode is not t.Skip(), t.SkipNow(), and t.Skipf(). If verification fails lrp creates a new report. This is an example for valid call t.Skip("https://github.com/istio/istio/issues/6012") These calls are not valid: t.Skip("https://istio.io/"), t.SkipNow(), t.Skipf("https://istio.io/%d", x).