PACKAGE
PYTEST_HELM_CHARTS
This package provides tools for working and testing helm charts.
MODULE
PYTEST_HELM_CHARTS.UTILS
Different utilities required over the whole testing lib.
Functions
delete_and_wait_for_objects
(
kube_client
,obj_type
,objects_to_del
,timeout_sec
)
— For each object inobjects_to_delete
, make an API call to delete it, then wait until the object is gone from k8s API server.</>wait_for_objects_condition
(
kube_client
,obj_type
,obj_names
,objs_namespace
,obj_condition_func
,timeout_sec
,missing_ok
,failure_condition_func
)
(list) — Block until all the kubernetes objects of typeobj_type
passobj_condition_fun
or timeout is reached. Ifobjs_namespace
is None, objects are treated as cluster-scope, otherwise as namespace-scope. If optionalfailure_condition_func
is passed, it is executed when objects are refreshed and if it evaluates toTrue
, it throwsObjectStatusError
exception.</>
MODULE
PYTEST_HELM_CHARTS.FIXTURES
This module defines fixtures for testing Helm Charts.
Functions
chart_path
(
pytestconfig
)
(str) — Return a path to the chart under test (from command line argument).</>chart_version
(
pytestconfig
)
(str) — Return a value that needs to be used as chart version override (from command line argument).</>cluster_type
(
pytestconfig
)
(str) — Return a type of cluster used for testing (from command line argument).</>cluster_version
(
pytestconfig
)
(str) — Return a type of cluster used for testing (from command line argument).</>kube_cluster
(
kube_config
)
(Cluster) — Return a ready Cluster object, which can already be used in test to connect to the cluster. Specific implementation used to provide the cluster depends on the '--cluster-type' command line option.</>kube_config
(
pytestconfig
)
(str) — Return a path to the kube.config file that points to a running cluster with app catalog platform tools already installed.</>test_extra_info
(
pytestconfig
)
(dict(str: str)) — Return an optional dict of variable names and values passed to the test using either the--extra-test-info
cmd line option or env vars prefixed with 'ATS_EXTRA_'.</>values_file_path
(
pytestconfig
)
(str) — Return a path to the yaml file that needs to be used to configure chart under test (from command line argument).</>
MODULE
PYTEST_HELM_CHARTS.CLUSTERS
This module introduces classes for handling different clusters.
Classes
Cluster
(
kube_config_path
)
— Represents an abstract cluster.</>ExistingCluster
— Implementation of Cluster that uses kube.config file to connect to external existing cluster.</>
PACKAGE
PYTEST_HELM_CHARTS.K8S
This package contains modules for working with standard kubernetes API objects
PACKAGE
PYTEST_HELM_CHARTS.FLUX
This package includes fixtures and utilities to work with Flux CD.
This package includes utilities to work with Giant Swarm application platform.