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 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) *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 DDAv2 *v2alpha1.DatadogAgent DDAv1 *v1alpha1.DatadogAgent Options *Options // Dependencies Store StoreOption *dependencies.StoreOptions StoreInitFunc func(store dependencies.StoreClient) RequiredComponents feature.RequiredComponents // Test configuration Agent *ComponentTest ClusterAgent *ComponentTest ClusterChecksRunner *ComponentTest // Want WantConfigure bool WantManageDependenciesErr bool WantDependenciesFunc func(testing.TB, dependencies.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.