framework

package
v1.13.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServiceAccountName            = "e2e-user"
	ServiceAccountTokenSecretName = "e2e-user-token"
)
View Source
const (
	SerialLabelName                = "Serial"
	RequiresClusterIPLabelName     = "RequiresClusterIP"
	RequiresObjectStorageLabelName = "RequiresObjectStorage"
)

Variables

View Source
var (
	Serial = []interface{}{
		g.Serial,
		g.Label(SerialLabelName),
	}
	RequiresClusterIP     = g.Label(RequiresClusterIPLabelName)
	RequiresObjectStorage = g.Label(RequiresObjectStorageLabelName)
)

Functions

func By

func By(format string, args ...interface{})

func DumpEventsInNamespace

func DumpEventsInNamespace(ctx context.Context, c kubernetes.Interface, namespace string)

func DumpNamespace added in v1.3.0

func DumpNamespace(ctx context.Context, discoveryClient discovery.DiscoveryInterface, dynamicClient dynamic.Interface, corev1Client corev1client.CoreV1Interface, artifactsDir, namespace string) error

func Errorf

func Errorf(format string, args ...interface{})

func Failf

func Failf(format string, args ...interface{})

func FieldManager added in v1.13.0

func FieldManager(userAgent, namespace string) string

func Infof

func Infof(format string, args ...interface{})

func Skipf

func Skipf(format string, args ...interface{})

func WaitForObjectDeletion

func WaitForObjectDeletion(ctx context.Context, dynamicClient dynamic.Interface, resource schema.GroupVersionResource, namespace, name string, uid *types.UID) error

func WaitForServiceAccount

func WaitForServiceAccount(ctx context.Context, c corev1client.CoreV1Interface, namespace, name string) (*corev1.ServiceAccount, error)

func WaitForServiceAccountTokenSecret added in v1.9.0

func WaitForServiceAccountTokenSecret(ctx context.Context, c corev1client.CoreV1Interface, namespace, name string) (*corev1.Secret, error)

func Warnf

func Warnf(format string, args ...interface{})

Types

type AdminClient added in v1.13.0

type AdminClient struct {
	Config *restclient.Config
}

func (*AdminClient) AdminClientConfig added in v1.13.0

func (ac *AdminClient) AdminClientConfig() *restclient.Config

func (*AdminClient) DiscoveryClient added in v1.13.0

func (ac *AdminClient) DiscoveryClient() *discovery.DiscoveryClient

func (*AdminClient) DynamicAdminClient added in v1.13.0

func (ac *AdminClient) DynamicAdminClient() dynamic.Interface

func (*AdminClient) KubeAdminClient added in v1.13.0

func (ac *AdminClient) KubeAdminClient() *kubernetes.Clientset

func (*AdminClient) ScyllaAdminClient added in v1.13.0

func (ac *AdminClient) ScyllaAdminClient() *scyllaclientset.Clientset

type AdminClientInterface added in v1.13.0

type AdminClientInterface interface {
	GenericClientInterface
	AdminClientConfig() *restclient.Config
	KubeAdminClient() *kubernetes.Clientset
	DynamicAdminClient() dynamic.Interface
	ScyllaAdminClient() *scyllaclientset.Clientset
}

type Client added in v1.13.0

type Client struct {
	Config *restclient.Config
}

func CreateUserNamespace added in v1.13.0

func CreateUserNamespace(ctx context.Context, clusterName string, labels map[string]string, adminClient kubernetes.Interface, adminClientConfig *restclient.Config) (*corev1.Namespace, Client)

func (*Client) ClientConfig added in v1.13.0

func (c *Client) ClientConfig() *restclient.Config

func (*Client) DiscoveryClient added in v1.13.0

func (c *Client) DiscoveryClient() *discovery.DiscoveryClient

func (*Client) DynamicClient added in v1.13.0

func (c *Client) DynamicClient() dynamic.Interface

func (*Client) KubeClient added in v1.13.0

func (c *Client) KubeClient() *kubernetes.Clientset

func (*Client) ScyllaClient added in v1.13.0

func (c *Client) ScyllaClient() *scyllaclientset.Clientset

type ClientInterface added in v1.13.0

type ClientInterface interface {
	GenericClientInterface
	ClientConfig() *restclient.Config
	KubeClient() *kubernetes.Clientset
	DynamicClient() dynamic.Interface
	ScyllaClient() *scyllaclientset.Clientset
}

type Cluster added in v1.13.0

type Cluster struct {
	AdminClient
	// contains filtered or unexported fields
}

func NewCluster added in v1.13.0

func NewCluster(name string, restConfig *restclient.Config, createNamespace createNamespaceFunc) *Cluster

func (*Cluster) Cleanup added in v1.13.0

func (c *Cluster) Cleanup(ctx context.Context)

func (*Cluster) CreateUserNamespace added in v1.13.0

func (c *Cluster) CreateUserNamespace(ctx context.Context) (*corev1.Namespace, Client)

func (*Cluster) DefaultNamespaceIfAny added in v1.13.0

func (c *Cluster) DefaultNamespaceIfAny() (*corev1.Namespace, Client, bool)

type ClusterInterface added in v1.13.0

type ClusterInterface interface {
	AdminClientInterface
	DefaultNamespaceIfAny() (*corev1.Namespace, Client, bool)
	CreateUserNamespace(ctx context.Context) (*corev1.Namespace, Client)
}

type DeleteTestingNSPolicyType

type DeleteTestingNSPolicyType string
var (
	DeleteTestingNSPolicyAlways    DeleteTestingNSPolicyType = "Always"
	DeleteTestingNSPolicyOnSuccess DeleteTestingNSPolicyType = "OnSuccess"
	DeleteTestingNSPolicyNever     DeleteTestingNSPolicyType = "Never"
)

type ExposeOptions added in v1.12.0

type ExposeOptions struct {
	NodeServiceType             scyllav1.NodeServiceType
	NodesBroadcastAddressType   scyllav1.BroadcastAddressType
	ClientsBroadcastAddressType scyllav1.BroadcastAddressType
}

type Framework

type Framework struct {
	FullClient
	// contains filtered or unexported fields
}

func NewFramework

func NewFramework(namePrefix string) *Framework

func (*Framework) Cluster added in v1.13.0

func (f *Framework) Cluster(idx int) ClusterInterface

func (*Framework) CommonLabels added in v1.9.0

func (f *Framework) CommonLabels() map[string]string

func (*Framework) CreateUserNamespace added in v1.13.0

func (f *Framework) CreateUserNamespace(ctx context.Context) (*corev1.Namespace, Client)

func (*Framework) DefaultNamespaceIfAny added in v1.13.0

func (f *Framework) DefaultNamespaceIfAny() (*corev1.Namespace, Client, bool)

func (*Framework) FieldManager added in v1.8.0

func (f *Framework) FieldManager() string

func (*Framework) GetDefaultScyllaCluster added in v1.12.0

func (f *Framework) GetDefaultScyllaCluster() *scyllav1.ScyllaCluster

func (*Framework) GetGCSServiceAccountKey added in v1.13.0

func (f *Framework) GetGCSServiceAccountKey() []byte

func (*Framework) GetIngressAddress added in v1.9.0

func (f *Framework) GetIngressAddress(hostname string) string

func (*Framework) GetObjectStorageBucket added in v1.13.0

func (f *Framework) GetObjectStorageBucket() string

func (*Framework) GetObjectStorageProvider added in v1.13.0

func (f *Framework) GetObjectStorageProvider() string

func (*Framework) GetObjectStorageType added in v1.13.0

func (f *Framework) GetObjectStorageType() ObjectStorageType

func (*Framework) Namespace

func (f *Framework) Namespace() string

type FullClient added in v1.13.0

type FullClient struct {
	Client
	AdminClient
}

func (*FullClient) DiscoveryClient added in v1.13.0

func (c *FullClient) DiscoveryClient() *discovery.DiscoveryClient

type FullClientInterface added in v1.13.0

type FullClientInterface interface {
	ClientInterface
	AdminClientInterface
}

type GenericClientInterface added in v1.13.0

type GenericClientInterface interface {
	DiscoveryClient() *discovery.DiscoveryClient
}

type IngressController added in v1.11.0

type IngressController struct {
	IngressClassName  string
	Address           string
	CustomAnnotations map[string]string
}

type ObjectStorageType added in v1.13.0

type ObjectStorageType string
const (
	ObjectStorageTypeNone ObjectStorageType = "None"
	ObjectStorageTypeGCS  ObjectStorageType = "GCS"
)

type ScyllaClusterOptions added in v1.12.0

type ScyllaClusterOptions struct {
	ExposeOptions ExposeOptions
}

type TestContextType

type TestContextType struct {
	RestConfigs           []*restclient.Config
	ArtifactsDir          string
	DeleteTestingNSPolicy DeleteTestingNSPolicyType
	IngressController     *IngressController
	ScyllaClusterOptions  *ScyllaClusterOptions
	ObjectStorageType     ObjectStorageType
	ObjectStorageBucket   string
	GCSServiceAccountKey  []byte
}
var TestContext *TestContextType

Jump to

Keyboard shortcuts

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