framework

package
v1.10.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2018 License: Apache-2.0 Imports: 28 Imported by: 4

Documentation

Index

Constants

View Source
const FederatedDefaultTestTimeout = 5 * time.Minute

Variables

This section is empty.

Functions

func CheckFederationVersion

func CheckFederationVersion(c federation_clientset.Interface, want string) error

func ClusterIsReadyOrFail

func ClusterIsReadyOrFail(f *Framework, clusterName string)

ClusterIsReadyOrFail checks whether the named cluster is ready

func FederationControlPlaneUpgrade

func FederationControlPlaneUpgrade(version string) error

func FederationSystemNamespace

func FederationSystemNamespace() string

FederationSystemNamespace returns the namespace in which the federation system components are hosted.

func GetValidDNSSubdomainName

func GetValidDNSSubdomainName(name string) (string, error)

GetValidDNSSubdomainName massages the given name to be a valid dns subdomain name. Most resources (such as secrets, clusters) require the names to be valid dns subdomain. This is a generic function (not specific to federation). Should be moved to a more generic location if others want to use it.

func GetZoneFromClusterName

func GetZoneFromClusterName(clusterName string) string

func LoadFederatedConfig

func LoadFederatedConfig(overrides *clientcmd.ConfigOverrides) (*restclient.Config, error)

func LoadFederationClientset

func LoadFederationClientset(config *restclient.Config) (*federation_clientset.Clientset, error)

func MasterUpgrade

func MasterUpgrade(context, version string) error

func SkipUnlessFederated

func SkipUnlessFederated(c clientset.Interface)

Detects whether the federation namespace exists in the underlying cluster

func ViperizeFlags

func ViperizeFlags()

func WaitForFederationApiserverReady

func WaitForFederationApiserverReady(c *federation_clientset.Clientset) error

WaitForFederationApiserverReady waits for the federation apiserver to be ready. It tests the readiness by sending a GET request and expecting a non error response.

Types

type Cluster

type Cluster struct {
	Name string
	*kubeclientset.Clientset
}

Cluster keeps track of the name and client of a cluster in the federation

type ClusterSlice

type ClusterSlice []*Cluster

ClusterSlice is a slice of clusters

type E2EContext

type E2EContext struct {
	// Raw context name,
	RawName string `yaml:"rawName"`
	// A valid dns subdomain which can be used as the name of kubernetes resources.
	Name    string                 `yaml:"name"`
	Cluster *framework.KubeCluster `yaml:"cluster"`
	User    *framework.KubeUser    `yaml:"user"`
}

type E2eTestLogger

type E2eTestLogger struct{}

Adapt the methods to log/fail in e2e to the interface expected by CRUDHelper

func (E2eTestLogger) Fatal

func (E2eTestLogger) Fatal(msg string)

func (E2eTestLogger) Fatalf

func (E2eTestLogger) Fatalf(format string, args ...interface{})

func (E2eTestLogger) Logf

func (E2eTestLogger) Logf(format string, args ...interface{})

type FederationTestContextType

type FederationTestContextType struct {
	// Federation e2e context
	FederatedKubeContext string
	// Federation control plane version to upgrade to while doing upgrade tests
	FederationUpgradeTarget string
	// Whether configuration for accessing federation member clusters should be sourced from the host cluster
	FederationConfigFromCluster bool
}
var TestContext FederationTestContextType

type Framework

type Framework struct {
	*framework.Framework

	FederationConfig *restclient.Config

	FederationClientset *federation_clientset.Clientset

	FederationNamespace *v1.Namespace
	// contains filtered or unexported fields
}

Framework extends e2e Framework and adds federation specific fields

func NewDefaultFederatedFramework

func NewDefaultFederatedFramework(baseName string) *Framework

func (*Framework) FederationAfterEach

func (f *Framework) FederationAfterEach()

FederationAfterEach deletes the namespace, after reading its events.

func (*Framework) FederationBeforeEach

func (f *Framework) FederationBeforeEach()

FederationBeforeEach checks for federation apiserver is ready and makes a namespace.

func (*Framework) GetClusterClients

func (f *Framework) GetClusterClients() []kubeclientset.Interface

func (*Framework) GetRegisteredClusters

func (f *Framework) GetRegisteredClusters() ClusterSlice

func (*Framework) GetUnderlyingFederatedContexts

func (f *Framework) GetUnderlyingFederatedContexts() []E2EContext

Jump to

Keyboard shortcuts

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