This package provides tools for working and testing helm charts.

Different utilities required over the whole testing lib.

  • create_job_and_run_to_completion(kube_client, namespace, job, timeout_sec, missing_ok) (Job) Creates Job object in k8s and blocks until it is completed.</>
  • ensure_namespace_exists(kube_client, namespace_name) (Namespace) Checks if the Namespace exists and creates it if it doesn't</>
  • make_job_object(kube_client, name_prefix, namespace, command, image, restart_policy, backoff_limit) (Job) Creates a Job object according to the parameters.</>
  • wait_for_daemon_sets_to_run(kube_client, daemon_set_names, daemon_sets_namespace, timeout_sec, missing_ok) (list of DaemonSet) Block until all the DaemonSets are running or timeout is reached.</>
  • wait_for_deployments_to_run(kube_client, deployment_names, deployments_namespace, timeout_sec, missing_ok) (list of Deployment) Block until all the Deployments are running or timeout is reached.</>
  • wait_for_jobs_to_complete(kube_client, job_names, jobs_namespace, timeout_sec, missing_ok) (list of Job) Block until all the Jobs are complete or timeout is reached.</>
  • wait_for_namespaced_objects_condition(kube_client, obj_type, obj_names, objs_namespace, obj_condition_func, timeout_sec, missing_ok) (list) Block until all the namespaced kubernetes objects of type obj_type pass obj_condition_fun or timeout is reached.</>
  • wait_for_stateful_sets_to_run(kube_client, stateful_set_names, stateful_sets_namespace, timeout_sec, missing_ok) (list of StatefulSet) Block until all the StatefulSets are running or timeout is reached.</>

This module introduces classes for handling different clusters.

  • Cluster(kube_config_path) Represents an abstract cluster.</>
  • ExistingCluster Implementation of Cluster that uses kube.config file to connect to external existing cluster.</>

This module defines fixtures for testing Helm Charts.

  • chart_extra_info(pytestconfig) (dict(str: str)) Return an optional dict of keywords and values passed to the test using '--chart-extra-info' config option.</>
  • 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).</>
  • kube_cluster(_existing_cluster_factory) (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. Used only if --cluster-type=existing (from command line argument).</>
  • namespace_factory(kube_cluster) (callable(str: Namespace)) Return a new namespace that is deleted once the fixture is disposed.</>
  • random_namespace(namespace_factory) (Namespace) Create and return a random kubernetes namespace that will be deleted at the end of test run.</>
  • 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).</>

This package include utilities to work with Giant Swarm application platform.