Documentation ¶
Index ¶
- func AKODeploymentConfigLabelsGetter(testcase *E2ETestCase) labelGetter
- func AllocVIP(runner *VIPRunner) (string, error)
- func ApplyLabelOnCluster(r *KubectlRunner, name, key, val string)
- func ClusterExists(r *TKGRunner, name string) bool
- func CreateCluster(r *TKGRunner, name string, vip string)
- func CreateNamespace(r *KubectlRunner)
- func DeleteCluster(r *TKGRunner, name string)
- func DeleteNamespace(r *KubectlRunner)
- func EnsureAKO(testcase *E2ETestCase, clusterName string)
- func EnsureAviObjectDeleted(aviClient aviclient.Client, clusterName string, obj string)
- func EnsureClusterGone(r *TKGRunner, name string)
- func EnsureClusterHasLabels(runner *KubectlRunner, name string, labels map[string]string)
- func EnsureClusterStatus(r *TKGRunner, name, status string)
- func EnsureClusterStatusWithTimeout(r *TKGRunner, name, status, timeout string)
- func EnsureIPAccessible(ip string, port int)
- func EnsureLoadBalancerService(testcase *E2ETestCase, clusterName string)
- func EnsureLoadBalancerTypeServiceAccessible(runner *KubectlRunner, expectedNum int)
- func EnsureObjectGone(runner *KubectlRunner, obj, objName string)
- func EnsurePodRunning(runner *KubectlRunner, podNamePrefix string, expectedNum int, namespace string)
- func EnsurePodRunningWithTimeout(runner *KubectlRunner, podNamePrefix string, expectedNum int, ...)
- func EnsureYamlsApplied(runner *KubectlRunner, yamlPaths []string)
- func GenerateRandomName() string
- func GetAviObject(runner *KubectlRunner, resourceType, resourceName, field, obj string) string
- func GetClusterCredential(r *TKGRunner, name string)
- func GetLoadBalancerServices(runner *KubectlRunner, expectedNum int, namespace string) []string
- func GetPodsStatuses(runner *KubectlRunner, podNamePrefix string, expectedNum int, namespace string) []string
- func LoadTestEnv(path string) error
- func NewAviRunner(runner *KubectlRunner) aviclient.Client
- func NotExist(path string) bool
- func ReadFromFile(file string) ([]byte, error)
- func ShowThePlan()
- type Clients
- type E2ETestCase
- func (o *E2ETestCase) EnsureAviResourcesDeleted(clusterName string)
- func (o *E2ETestCase) EnsureCRSandAviUserDeleted(clusterName string)
- func (o *E2ETestCase) EnsureClusterCreated(name string)
- func (o *E2ETestCase) EnsureClusterDeleted(name string)
- func (o *E2ETestCase) EnsureClusterLabelApplied(clusterName string, labelGetter labelGetter)
- func (o *E2ETestCase) EnsureYamlsApplied(yamlPaths []string)
- func (o *E2ETestCase) EnsureYamlsRemoved(yamlPaths []string)
- func (o *E2ETestCase) Init()
- func (o *E2ETestCase) SanityCheck()
- func (o *E2ETestCase) Teardown()
- type Env
- type Kubecontext
- type KubectlRunner
- func (runner *KubectlRunner) Run(args ...string) *gexec.Session
- func (runner *KubectlRunner) RunInNamespace(namespace string, args ...string) *gexec.Session
- func (runner *KubectlRunner) RunWithArgs(args ...string) *gexec.Session
- func (runner *KubectlRunner) RunWithoutNamespace(args ...string) *gexec.Session
- type TKGRunner
- type TestCaseSpec
- type TestEnvSpec
- type VIPRunner
- type YamlTarget
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AKODeploymentConfigLabelsGetter ¶
func AKODeploymentConfigLabelsGetter(testcase *E2ETestCase) labelGetter
func ApplyLabelOnCluster ¶
func ApplyLabelOnCluster(r *KubectlRunner, name, key, val string)
func ClusterExists ¶
func CreateCluster ¶
func CreateNamespace ¶
func CreateNamespace(r *KubectlRunner)
func DeleteCluster ¶
func DeleteNamespace ¶
func DeleteNamespace(r *KubectlRunner)
func EnsureAKO ¶
func EnsureAKO(testcase *E2ETestCase, clusterName string)
func EnsureAviObjectDeleted ¶
func EnsureClusterGone ¶
func EnsureClusterHasLabels ¶
func EnsureClusterHasLabels(runner *KubectlRunner, name string, labels map[string]string)
func EnsureClusterStatus ¶
func EnsureIPAccessible ¶
func EnsureLoadBalancerService ¶
func EnsureLoadBalancerService(testcase *E2ETestCase, clusterName string)
func EnsureLoadBalancerTypeServiceAccessible ¶
func EnsureLoadBalancerTypeServiceAccessible(runner *KubectlRunner, expectedNum int)
func EnsureObjectGone ¶
func EnsureObjectGone(runner *KubectlRunner, obj, objName string)
func EnsurePodRunning ¶
func EnsurePodRunning(runner *KubectlRunner, podNamePrefix string, expectedNum int, namespace string)
func EnsurePodRunningWithTimeout ¶
func EnsurePodRunningWithTimeout(runner *KubectlRunner, podNamePrefix string, expectedNum int, namespace, timeout string)
func EnsureYamlsApplied ¶
func EnsureYamlsApplied(runner *KubectlRunner, yamlPaths []string)
func GenerateRandomName ¶
func GenerateRandomName() string
func GetAviObject ¶
func GetAviObject(runner *KubectlRunner, resourceType, resourceName, field, obj string) string
func GetClusterCredential ¶
func GetLoadBalancerServices ¶
func GetLoadBalancerServices(runner *KubectlRunner, expectedNum int, namespace string) []string
func GetPodsStatuses ¶
func GetPodsStatuses(runner *KubectlRunner, podNamePrefix string, expectedNum int, namespace string) []string
func LoadTestEnv ¶
func NewAviRunner ¶
func NewAviRunner(runner *KubectlRunner) aviclient.Client
func ReadFromFile ¶
func ShowThePlan ¶
func ShowThePlan()
Types ¶
type Clients ¶
type Clients struct { Kubectl *KubectlRunner TKGCli *TKGRunner VIP *VIPRunner Avi aviclient.Client }
type E2ETestCase ¶
type E2ETestCase struct { Clients Clients AKODeploymentConfig YamlTarget YAMLs []YamlTarget }
E2ETestCase runs tests case in one separate namespace
func LoadTestCase ¶
func LoadTestCase(name string) (bool, *E2ETestCase)
LoadTestTest checks if the testcase is registered to run. It takes one parameter:
string: name of the testcase
It returns two values:
bool: if it's true, then the test case is not registered and should be skipped *E2ETestCase: an encapsulation of a Test Case's env
func (*E2ETestCase) EnsureAviResourcesDeleted ¶
func (o *E2ETestCase) EnsureAviResourcesDeleted(clusterName string)
func (*E2ETestCase) EnsureCRSandAviUserDeleted ¶
func (o *E2ETestCase) EnsureCRSandAviUserDeleted(clusterName string)
func (*E2ETestCase) EnsureClusterCreated ¶
func (o *E2ETestCase) EnsureClusterCreated(name string)
func (*E2ETestCase) EnsureClusterDeleted ¶
func (o *E2ETestCase) EnsureClusterDeleted(name string)
func (*E2ETestCase) EnsureClusterLabelApplied ¶
func (o *E2ETestCase) EnsureClusterLabelApplied(clusterName string, labelGetter labelGetter)
func (*E2ETestCase) EnsureYamlsApplied ¶
func (o *E2ETestCase) EnsureYamlsApplied(yamlPaths []string)
func (*E2ETestCase) EnsureYamlsRemoved ¶
func (o *E2ETestCase) EnsureYamlsRemoved(yamlPaths []string)
func (*E2ETestCase) SanityCheck ¶
func (o *E2ETestCase) SanityCheck()
type Env ¶
type Env struct { TKGConfig string `json:"tkg-config"` ManagementClusterKubeconfig Kubecontext `json:"mc-kubeconfig"` Worker string `json:"worker"` }
type Kubecontext ¶
type KubectlRunner ¶
func NewKubectlRunner ¶
func NewKubectlRunner(kubeConfigPath, context, namespace string) *KubectlRunner
func (*KubectlRunner) RunInNamespace ¶
func (runner *KubectlRunner) RunInNamespace(namespace string, args ...string) *gexec.Session
func (*KubectlRunner) RunWithArgs ¶
func (runner *KubectlRunner) RunWithArgs(args ...string) *gexec.Session
func (*KubectlRunner) RunWithoutNamespace ¶
func (runner *KubectlRunner) RunWithoutNamespace(args ...string) *gexec.Session
type TKGRunner ¶
func NewTKGRunner ¶
type TestCaseSpec ¶
type TestCaseSpec struct { Name string `json:"name"` AKODeploymentConfig YamlTarget `json:"akoDeploymentConfig"` YAMLs []YamlTarget `json:"yamls"` }
type TestEnvSpec ¶
type TestEnvSpec struct { Env Env Tests []TestCaseSpec }
TestEnvSpec is the specification for an e2e tests which includes: 1. the infra information where these tests will run; 2. an array of test cases that'll be run and the test specific settings;
type YamlTarget ¶
Click to show internal directories.
Click to hide internal directories.