Skip to content

Latest commit

 

History

History
90 lines (73 loc) · 3.4 KB

gardener-default.md

File metadata and controls

90 lines (73 loc) · 3.4 KB

Default Gardener Test

The default gardener test tests a new gardener release or specifc commit.

The Testrun is generated in Golang by this render function. This function is used by the testrunner and the github bot to create and run the test.

The default test consists of the following steps:

  • select and lock a host cluster
  • create a gardener
  • test shoots
    • create shoot
    • test shoot
    • delete shoot
  • delete gardener
  • release host cluster

This tesflow can be configured to test different shoot flavors and test scenarios. The configuration is wrapped by the testrunner and github bot to ease the configuration and set necessecary defaults for specific installations and use cases.

// Config is used to render a default gardener test
type Config struct {
	// Namespace of the testrun
	Namespace string

	// Provider where the host clusters are selected from
	HostProvider hostscheduler.Provider

	// CloudProvider of the base cluster (has to be specified to install the correct credentials and cloudprofiles for the soil/seeds)
	BaseClusterCloudprovider gardenv1beta1.CloudProvider

	// Revision for the gardensetup repo that i sused to install gardener
	GardenSetupRevision string

	// List of components (by default read from a component_descriptor) that are added as locations
	Components componentdescriptor.ComponentList

	// Gardener specific configuration
	Gardener templates.GardenerConfig

	// Gardener tests that do not depend on shoots and run after the shoot tests
	Tests renderer.TestsFunc

	// Shoot test flavor configuration
	Shoots ShootsConfig
}

// ShootsConfig describes the flavors of the shoots that are created by the test.
// The resulting shoot test matrix consists of
// - shoot tests for all specified cloudproviders with all specified kubernets with the default test
// - shoot tests for all specified cloudproviders for all specified tests
type ShootsConfig struct {
	// Shoot/Project namespace where the shoots are created
	Namespace          string

	// Default test that is used for all cloudprovider and kubernetes flavors.
	DefaultTest        renderer.TestsFunc

	// Specific tests that get their own shoot per cloudprovider and run in parallel to the default tests
	Tests              []renderer.TestsFunc

	// Kubernetes versions to test
	KubernetesVersions []string

	// Cloudproviders to test
	CloudProviders     []gardenv1beta1.CloudProvider
}