Documentation ¶
Index ¶
- Constants
- Variables
- func CreateClusterRole(kubeClient kubernetes.Interface, relativePath string) error
- func CreateClusterRoleBinding(kubeClient kubernetes.Interface, ns, relativePath string) error
- func CreateDeployment(kubeClient kubernetes.Interface, ns, image, relativePath string) error
- func CreateServiceAccount(kubeClient kubernetes.Interface, namespace string, relativePath string) error
- func DeleteClusterRole(kubeClient kubernetes.Interface, relativePath string) error
- func DeleteClusterRoleBinding(kubeClient kubernetes.Interface, relativePath string) error
- func DeleteDeployment(kubeClient kubernetes.Interface, ns, relativePath string) error
- func DeleteServiceAccount(kubeClient kubernetes.Interface, namespace string, relativePath string) error
- func DeploymentComplete(deployment *apps.Deployment, newStatus *apps.DeploymentStatus) bool
- func DescribeGene(text string, body func(*GeneTestContext)) bool
- func GenectlCmd(args ...string) *exec.Cmd
- func NewGenectlCommand(args ...string) *genectlWrapper
- func ReadResult(fileName string) (string, error)
- func ReadResultFrom(fullpath string) (string, error)
- func Test(t *testing.T, config *Config)
- func WaitForExecutionSuccess(client execclientset.Interface, name, ns string) error
- func WaitForPersistentVolumeBound(c kubernetes.Interface, pvName string) error
- func WaitForPersistentVolumeClaimBound(c kubernetes.Interface, ns string, pvcName string) error
- type Config
- type GeneTestContext
Constants ¶
View Source
const ExecutionTimeout = 5 * time.Minute
View Source
const Poll = 2 * time.Second
View Source
const TestPath = "/kubegene"
View Source
const VolumeTimeout = 2 * time.Minute
Variables ¶
View Source
var GOPATH = os.Getenv("GOPATH")
View Source
var ToolRepo = filepath.Join(GOPATH, "src/kubegene.io/kubegene/example/tools")
Functions ¶
func CreateClusterRole ¶
func CreateClusterRole(kubeClient kubernetes.Interface, relativePath string) error
func CreateClusterRoleBinding ¶
func CreateClusterRoleBinding(kubeClient kubernetes.Interface, ns, relativePath string) error
func CreateDeployment ¶
func CreateDeployment(kubeClient kubernetes.Interface, ns, image, relativePath string) error
func CreateServiceAccount ¶
func CreateServiceAccount(kubeClient kubernetes.Interface, namespace string, relativePath string) error
func DeleteClusterRole ¶
func DeleteClusterRole(kubeClient kubernetes.Interface, relativePath string) error
func DeleteClusterRoleBinding ¶
func DeleteClusterRoleBinding(kubeClient kubernetes.Interface, relativePath string) error
func DeleteDeployment ¶
func DeleteDeployment(kubeClient kubernetes.Interface, ns, relativePath string) error
func DeleteServiceAccount ¶
func DeleteServiceAccount(kubeClient kubernetes.Interface, namespace string, relativePath string) error
func DeploymentComplete ¶
func DeploymentComplete(deployment *apps.Deployment, newStatus *apps.DeploymentStatus) bool
func DescribeGene ¶
func DescribeGene(text string, body func(*GeneTestContext)) bool
DescribeGene must be used instead of the usual Ginkgo Describe to register a test block. The difference is that the body function will be called multiple times with the right context (when setting up a Ginkgo suite or a testing.T test, with the right configuration).
func GenectlCmd ¶
GenectlCmd runs the genectl executable through the wrapper script.
func NewGenectlCommand ¶
func NewGenectlCommand(args ...string) *genectlWrapper
func ReadResult ¶
func ReadResultFrom ¶
func WaitForExecutionSuccess ¶
func WaitForExecutionSuccess(client execclientset.Interface, name, ns string) error
func WaitForPersistentVolumeBound ¶
func WaitForPersistentVolumeBound(c kubernetes.Interface, pvName string) error
func WaitForPersistentVolumeClaimBound ¶
func WaitForPersistentVolumeClaimBound(c kubernetes.Interface, ns string, pvcName string) error
Types ¶
type GeneTestContext ¶
type GeneTestContext struct { Config *Config KubeClient kubernetes.Interface GeneClient execclientset.Interface }
GeneTestContext holds the variables that each test can depend on. It gets initialized before each test block runs.
Click to show internal directories.
Click to hide internal directories.