Documentation
¶
Index ¶
- func DurationToFloat(dur time.Duration) float64
- type Framework
- type Options
- type TestCaseBuilder
- func (b *TestCaseBuilder) Cluster() *TestCaseBuilder
- func (b *TestCaseBuilder) Do() bool
- func (b *TestCaseBuilder) Namespaced() *TestCaseBuilder
- func (b *TestCaseBuilder) P0() *TestCaseBuilder
- func (b *TestCaseBuilder) P1() *TestCaseBuilder
- func (b *TestCaseBuilder) P2() *TestCaseBuilder
- func (b *TestCaseBuilder) P3() *TestCaseBuilder
- func (b *TestCaseBuilder) WithFunc(tc TestFunction) *TestCaseBuilder
- func (b *TestCaseBuilder) WithPriority(prior TestCasePriority) *TestCaseBuilder
- type TestCasePriority
- type TestCaseScope
- type TestContext
- type TestFunction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DurationToFloat ¶
DurationToFloat converts a duration into a float64 seconds, useful for Ginkgo methods
Types ¶
type Framework ¶
type Framework struct {
Name string
Config *rest.Config
Scheme *runtime.Scheme
Context context.Context
*zap.SugaredLogger
Output io.Writer
InitTimeout time.Duration
sync.Once
}
Framework base framework for running automated test cases
func (*Framework) SynchronizedAfterSuite ¶
SynchronizedAfterSuite destroys the whole environment
func (*Framework) SynchronizedBeforeSuite ¶
SynchronizedBeforeSuite basic before suite initialization
type Options ¶
type Options struct {
// Name oof the test case
Name string
// Priority of the test case
Priority TestCasePriority
// Scope defines what kind of permissions this test case needs
Scope TestCaseScope
}
Options options for TestCase
type TestCaseBuilder ¶
type TestCaseBuilder struct {
// contains filtered or unexported fields
}
TestCaseBuilder builder for TestCases helps provide methods to construct
func (*TestCaseBuilder) Cluster ¶
func (b *TestCaseBuilder) Cluster() *TestCaseBuilder
Cluster set the scope of the testcase as a cluster scoped
func (*TestCaseBuilder) Do ¶
func (b *TestCaseBuilder) Do() bool
Do builds and returns the test case
func (*TestCaseBuilder) Namespaced ¶
func (b *TestCaseBuilder) Namespaced() *TestCaseBuilder
Namespaced set the scope of the testcase as namespaced
func (*TestCaseBuilder) WithFunc ¶
func (b *TestCaseBuilder) WithFunc(tc TestFunction) *TestCaseBuilder
WithFunc replaces the function with another given function
func (*TestCaseBuilder) WithPriority ¶
func (b *TestCaseBuilder) WithPriority(prior TestCasePriority) *TestCaseBuilder
WithPriority sets priorities
type TestCasePriority ¶
type TestCasePriority uint16
TestCasePriority priority for the testcase
const ( // P0 critical priority test case P0 TestCasePriority = 0 // P1 high priority test case P1 TestCasePriority = 1 // P2 medium priority test case P2 TestCasePriority = 2 // P3 low priority test case P3 TestCasePriority = 3 )
type TestCaseScope ¶
type TestCaseScope string
TestCaseScope scope for test case
const ( // ClusterScoped cluster test case scope ClusterScoped TestCaseScope = "Cluster" //NamespaceScoped test case scoped for a namespace NamespaceScoped TestCaseScope = "Namespaced" )