Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComponentTest ¶
type ComponentTest struct {
CreateFunc func(testing.TB) (feature.PodTemplateManagers, string)
WantFunc func(testing.TB, feature.PodTemplateManagers)
}
ComponentTest use to configure how to test a component (Cluster-Agent, Agent, ClusterChecksRunner)
func NewDefaultComponentTest ¶
func NewDefaultComponentTest() *ComponentTest
NewDefaultComponentTest returns a default ComponentTest
func (*ComponentTest) WithCreateFunc ¶
func (ct *ComponentTest) WithCreateFunc(f func(testing.TB) (feature.PodTemplateManagers, string)) *ComponentTest
WithCreateFunc sets CreateFunc
func (*ComponentTest) WithWantFunc ¶
func (ct *ComponentTest) WithWantFunc(f func(testing.TB, feature.PodTemplateManagers)) *ComponentTest
WithWantFunc sets WantFunc
type FeatureTest ¶
type FeatureTest struct {
Name string
// Inputs
DDA *v2alpha1.DatadogAgent
Options *Options
FeatureOptions *feature.Options
// Dependencies Store
StoreOption *store.StoreOptions
StoreInitFunc func(store store.StoreClient)
RequiredComponents feature.RequiredComponents
// Test configuration
Agent *ComponentTest
ClusterAgent *ComponentTest
ClusterChecksRunner *ComponentTest
// Want
WantConfigure bool
WantManageDependenciesErr bool
WantDependenciesFunc func(testing.TB, store.StoreClient)
}
FeatureTest use to define a Feature test
type FeatureTestSuite ¶
type FeatureTestSuite []FeatureTest
FeatureTestSuite use define several tests on a Feature how to define a test:
func Test_MyFeature_(t *testing.T) {
tests := test.FeatureTestSuite{}
tests.Run(t, myFeatureBuildFunc)
}
Click to show internal directories.
Click to hide internal directories.