Documentation ¶
Index ¶
- Constants
- func FederatedTypeConfigs() ([]typeconfig.Interface, error)
- func GetPlacementTestObject(typeConfig typeconfig.Interface, namespace string, clusterNames []string) (*unstructured.Unstructured, error)
- func NewEndpointObject(name, namespace string) *apiv1.Endpoints
- func NewServiceDNSObject(baseName, namespace string) *dnsv1a1.MultiClusterServiceDNSRecord
- func NewServiceObject(name, namespace string) *apiv1.Service
- func NewTestObjects(typeConfig typeconfig.Interface, namespace string, clusterNames []string) (template, placement, override *unstructured.Unstructured, err error)
- func ReaderToObj(r io.Reader) (*unstructured.Unstructured, error)
- func WaitForObject(tl TestLogger, namespace, name string, ...)
- func WaitForObjectDeletion(tl TestLogger, namespace, name string, ...)
- type FederatedTypeCrudTester
- func (c *FederatedTypeCrudTester) CheckCreate(desiredTemplate, desiredPlacement, desiredOverride *unstructured.Unstructured) (*unstructured.Unstructured, *unstructured.Unstructured, ...)
- func (c *FederatedTypeCrudTester) CheckDelete(template *unstructured.Unstructured, orphanDependents *bool)
- func (c *FederatedTypeCrudTester) CheckLifecycle(desiredTemplate, desiredPlacement, desiredOverride *unstructured.Unstructured)
- func (c *FederatedTypeCrudTester) CheckPlacementChange(template, placement, override *unstructured.Unstructured)
- func (c *FederatedTypeCrudTester) CheckPropagation(template, placement, override *unstructured.Unstructured)
- func (c *FederatedTypeCrudTester) CheckUpdate(template, placement, override *unstructured.Unstructured)
- func (c *FederatedTypeCrudTester) Create(desiredTemplate, desiredPlacement, desiredOverride *unstructured.Unstructured) (*unstructured.Unstructured, *unstructured.Unstructured, ...)
- type TestCluster
- type TestLogger
Constants ¶
View Source
const (
AnnotationTestFederationCrudUpdate string = "federation.kubernetes.io/test-federation-crud-update"
)
Variables ¶
This section is empty.
Functions ¶
func FederatedTypeConfigs ¶
func FederatedTypeConfigs() ([]typeconfig.Interface, error)
func GetPlacementTestObject ¶
func GetPlacementTestObject(typeConfig typeconfig.Interface, namespace string, clusterNames []string) (*unstructured.Unstructured, error)
func NewEndpointObject ¶
func NewServiceDNSObject ¶
func NewServiceDNSObject(baseName, namespace string) *dnsv1a1.MultiClusterServiceDNSRecord
func NewServiceObject ¶
func NewTestObjects ¶
func NewTestObjects(typeConfig typeconfig.Interface, namespace string, clusterNames []string) (template, placement, override *unstructured.Unstructured, err error)
func ReaderToObj ¶
func ReaderToObj(r io.Reader) (*unstructured.Unstructured, error)
func WaitForObject ¶
func WaitForObject(tl TestLogger, namespace, name string, objectGetter func(namespace, name string) (pkgruntime.Object, error), desired pkgruntime.Object, interval, timeout time.Duration)
WaitForObject waits for object to match the desired status.
func WaitForObjectDeletion ¶
func WaitForObjectDeletion(tl TestLogger, namespace, name string, objectGetter func(namespace, name string) (pkgruntime.Object, error), interval, timeout time.Duration)
WaitForObjectDeletion waits for the object to be deleted.
Types ¶
type FederatedTypeCrudTester ¶
type FederatedTypeCrudTester struct {
// contains filtered or unexported fields
}
FederatedTypeCrudTester exercises Create/Read/Update/Delete operations for federated types via the Federation API and validates that the results of those operations are propagated to clusters that are members of a federation.
func NewFederatedTypeCrudTester ¶
func NewFederatedTypeCrudTester(testLogger TestLogger, typeConfig typeconfig.Interface, kubeConfig *rest.Config, testClusters map[string]TestCluster, waitInterval, clusterWaitTimeout time.Duration) (*FederatedTypeCrudTester, error)
func (*FederatedTypeCrudTester) CheckCreate ¶
func (c *FederatedTypeCrudTester) CheckCreate(desiredTemplate, desiredPlacement, desiredOverride *unstructured.Unstructured) (*unstructured.Unstructured, *unstructured.Unstructured, *unstructured.Unstructured)
func (*FederatedTypeCrudTester) CheckDelete ¶
func (c *FederatedTypeCrudTester) CheckDelete(template *unstructured.Unstructured, orphanDependents *bool)
func (*FederatedTypeCrudTester) CheckLifecycle ¶
func (c *FederatedTypeCrudTester) CheckLifecycle(desiredTemplate, desiredPlacement, desiredOverride *unstructured.Unstructured)
func (*FederatedTypeCrudTester) CheckPlacementChange ¶
func (c *FederatedTypeCrudTester) CheckPlacementChange(template, placement, override *unstructured.Unstructured)
CheckPlacementChange verifies that a change in the list of clusters in a placement resource has the desired impact on member cluster state.
func (*FederatedTypeCrudTester) CheckPropagation ¶
func (c *FederatedTypeCrudTester) CheckPropagation(template, placement, override *unstructured.Unstructured)
CheckPropagation checks propagation for the crud tester's clients
func (*FederatedTypeCrudTester) CheckUpdate ¶
func (c *FederatedTypeCrudTester) CheckUpdate(template, placement, override *unstructured.Unstructured)
func (*FederatedTypeCrudTester) Create ¶
func (c *FederatedTypeCrudTester) Create(desiredTemplate, desiredPlacement, desiredOverride *unstructured.Unstructured) (*unstructured.Unstructured, *unstructured.Unstructured, *unstructured.Unstructured)
type TestCluster ¶
type TestCluster struct { Client util.ResourceClient IsPrimary bool }
type TestLogger ¶
type TestLogger interface { Errorf(format string, args ...interface{}) Fatal(args ...interface{}) Fatalf(format string, args ...interface{}) Log(args ...interface{}) Logf(format string, args ...interface{}) }
TestLogger defines operations common across different types of testing
Click to show internal directories.
Click to hide internal directories.