integration

package
v0.0.0-...-70bddff Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneGitRepo

func CloneGitRepo(url string) error

CloneGitRepo clones a repo from an URL

func CloneGitRepoWithBranch

func CloneGitRepoWithBranch(url, branch string) error

CloneGitRepoWithBranch clones a repo by its URL in an specific branch

func DeleteGitRepo

func DeleteGitRepo(path string) error

DeleteGitRepo deletes the path passed as argument

func DestroyPod

func DestroyPod(ctx context.Context, ns, labelSelector string, c kubernetes.Interface) error

DestroyPod returns a deployment given a namespace and name

func GetConfigmap

func GetConfigmap(ctx context.Context, ns, name string, client kubernetes.Interface) (*corev1.ConfigMap, error)

GetConfigmap returns a configmap given name and namespace

func GetContentFromURL

func GetContentFromURL(url string, timeout time.Duration) string

GetContentFromURL returns the content of the url

func GetCurrentNamespace

func GetCurrentNamespace() string

GetCurrentNamespace returns the current namespace of the kubeconfig path

func GetDeployment

func GetDeployment(ctx context.Context, ns, name string, client kubernetes.Interface) (*appsv1.Deployment, error)

GetDeployment returns a deployment given a namespace and name

func GetDeploymentList

func GetDeploymentList(ctx context.Context, ns string, client kubernetes.Interface) ([]appsv1.Deployment, error)

GetDeploymentList returns all deployments given a namespace

func GetOktetoPath

func GetOktetoPath() (string, error)

GetOktetoPath returns the okteto path used to run tests set OKTETO_PATH to the bin you want to test otherwise it'll use the one you have in your path

func GetPodsBySelector

func GetPodsBySelector(ctx context.Context, ns, selector string, client kubernetes.Interface) (*corev1.PodList, error)

func GetService

func GetService(ctx context.Context, ns, name string, client kubernetes.Interface) (*corev1.Service, error)

GetService returns a service given a namespace and a name

func GetStatefulset

func GetStatefulset(ctx context.Context, ns, name string, client kubernetes.Interface) (*appsv1.StatefulSet, error)

GetStatefulset returns a sfs given a namespace and name

func GetStatefulsetList

func GetStatefulsetList(ctx context.Context, ns string, client kubernetes.Interface) ([]appsv1.StatefulSet, error)

GetStatefulsetList returns all sfs given a namespace

func GetTestNamespace

func GetTestNamespace(name string) string

GetTestNamespace returns the name for a namespace

func GetToken

func GetToken() string

GetToken returns the token used to run tests

func GetVolume

func GetVolume(ctx context.Context, ns, name string, client kubernetes.Interface) (*corev1.PersistentVolumeClaim, error)

GetVolume returns a volume given a namespace and name

func GitInit

func GitInit(path string) error

func K8sClient

func K8sClient() (*kubernetes.Clientset, *rest.Config, error)

K8sClient returns a kubernetes client for current KUBECONFIG

func RunOktetoVersion

func RunOktetoVersion(oktetoPath string) (string, error)

RunOktetoVersion runs okteto version given an oktetoPath

func SkipIfNotOktetoCluster

func SkipIfNotOktetoCluster(t *testing.T)

SkipIfNotOktetoCluster skips a tests if is not on an okteto cluster

func SkipIfWindows

func SkipIfWindows(t *testing.T)

SkipIfWindows skips a tests if is on a windows environment

func UpdateDeployment

func UpdateDeployment(ctx context.Context, ns string, d *appsv1.Deployment, client kubernetes.Interface) error

UpdateDeployment updates a current deployment

func UpdateStatefulset

func UpdateStatefulset(ctx context.Context, ns string, sfs *appsv1.StatefulSet, client kubernetes.Interface) error

UpdateStatefulset updates a statefulset

func WaitForDeployment

func WaitForDeployment(kubectlBinary string, kubectlOpts *commands.KubectlOptions, revision int, timeout time.Duration) error

WaitForDeployment waits until a deployment is rollout correctly

func WaitForStatefulset

func WaitForStatefulset(kubectlBinary string, kubectlOpts *commands.KubectlOptions, timeout time.Duration) error

WaitForStatefulset waits until a sfs is rollout correctly

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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