v0.0.10 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2019 License: Apache-2.0 Imports: 29 Imported by: 0




This section is empty.


This section is empty.


func CreateResource added in v0.0.7

func CreateResource(kubeconfig *restclient.Config, apiResource metav1.APIResource, desiredObj *unstructured.Unstructured) (*unstructured.Unstructured, error)

func GetTypeConfig added in v0.0.7

func GetTypeConfig(genericClient client.Client, name, namespace string) (typeconfig.Interface, error)

func NewDNSEndpoint added in v0.0.2

func NewDNSEndpoint(dnsName string, targets []string, recordType string, recordTTL dnsv1a1.TTL) *dnsv1a1.Endpoint

func NewDomainObject added in v0.0.3

func NewDomainObject(federation, domain string) *dnsv1a1.Domain

func NewEndpointObject

func NewEndpointObject(name, namespace string) *apiv1.Endpoints

func NewIngressDNSObject added in v0.0.2

func NewIngressDNSObject(baseName, namespace string) *dnsv1a1.IngressDNSRecord

func NewIngressObject added in v0.0.2

func NewIngressObject(name, namespace string) *extv1b1.Ingress

func NewServiceDNSObject

func NewServiceDNSObject(baseName, namespace string) *dnsv1a1.ServiceDNSRecord

func NewServiceObject

func NewServiceObject(name, namespace string) *apiv1.Service

func NewTestObject added in v0.0.6

func NewTestObject(typeConfig typeconfig.Interface, namespace string, clusterNames []string, fixture *unstructured.Unstructured) (*unstructured.Unstructured, error)

func NewTestTargetObject added in v0.0.7

func NewTestTargetObject(typeConfig typeconfig.Interface, namespace string, fixture *unstructured.Unstructured) (*unstructured.Unstructured, error)

func OverridesFromFixture added in v0.0.7

func OverridesFromFixture(clusterNames []string, fixture *unstructured.Unstructured) ([]interface{}, error)

func TypeConfigFixturesOrDie added in v0.0.4

func TypeConfigFixturesOrDie(tl TestLogger) map[string]*unstructured.Unstructured

func WaitForNamespaceOrDie added in v0.0.2

func WaitForNamespaceOrDie(tl TestLogger, client kubeclientset.Interface, clusterName, namespace string, interval, timeout time.Duration)

WaitForNamespace waits for namespace to be created in a cluster.

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.


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(targetObject *unstructured.Unstructured, overrides []interface{}) *unstructured.Unstructured

func (*FederatedTypeCrudTester) CheckDelete

func (c *FederatedTypeCrudTester) CheckDelete(fedObject *unstructured.Unstructured, orphanDependents bool)

func (*FederatedTypeCrudTester) CheckLifecycle

func (c *FederatedTypeCrudTester) CheckLifecycle(targetObject *unstructured.Unstructured, overrides []interface{})

func (*FederatedTypeCrudTester) CheckPlacementChange

func (c *FederatedTypeCrudTester) CheckPlacementChange(fedObject *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(fedObject *unstructured.Unstructured)

CheckPropagation checks propagation for the crud tester's clients

func (*FederatedTypeCrudTester) CheckStatusCreated added in v0.0.3

func (c *FederatedTypeCrudTester) CheckStatusCreated(qualifiedName util.QualifiedName)

func (*FederatedTypeCrudTester) CheckUpdate

func (c *FederatedTypeCrudTester) CheckUpdate(fedObject *unstructured.Unstructured)

func (*FederatedTypeCrudTester) Create

func (c *FederatedTypeCrudTester) Create(targetObject *unstructured.Unstructured, overrides []interface{}) *unstructured.Unstructured

func (*FederatedTypeCrudTester) TestClusters added in v0.0.2

func (c *FederatedTypeCrudTester) TestClusters() map[string]TestCluster

type TestCluster

type TestCluster struct {
	Client util.ResourceClient

type TestClusterConfig added in v0.0.3

type TestClusterConfig struct {
	Config    *rest.Config
	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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL