Most important fixtures included

The current list of all available fixtures can be found by running pytest --fixtures.

The most important list is included below.

Generic fixture

generator
pytest_helm_charts.fixtures.kube_cluster(cluster_type, _existing_cluster_factory, _kind_cluster_factory, _giantswarm_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.

Giant Swarm App Platform

generator
pytest_helm_charts.giantswarm_app_platform.fixtures.app_factory(kube_cluster, app_catalog_factory) → callable(str, str, str, str, str, dict(str: any): ConfiguredApp)

Returns a factory function which can be used to install an app using App CR

generator

Return a factory object, that can be used to configure new AppCatalog CRs for the 'app-operator' running in the cluster

Applications useful for testing

We provide fixtures delivering some applications that might be useful for testing apps, like load generators or simple test apps. They are deployed using Giant Swarm App Platform fixtures.

HTTP testing

A factory fixture to return a function that can produce Gatling instances. Gatling is a HTTP performance testing tool.

Parameters
Returns (iterable of callable(str, dict(str: str), optional: ConfiguredApp))

A function you can use to create Gatling instances.

A factory fixture to return a function that can produce Stromforger Load App instances.

Parameters
Returns (callable(int, str, dict(str: str), optional: ConfiguredApp))

A function you can use to create stormforger instances. The function has the following args.

Examples

Create and run using 8 replicas erving the 'loadtest.local' URL. Use affinity selector to run on the 'localhost' Kubernetes Node.

>>> stormforger_load_app_factory(8, "loadtest.local", {"kubernetes.io/hostname": "localhost"})