Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Capability ¶
type Capability string
Capability identifies a requirement that a load test has on the test environment. Pass one or more capabilities to Require() to declare which environment variables must be set.
var ( // KCPFrontProxyKubeconfig declares that the test requires the // FRONTPROXY_KUBECONFIG env var to be set. KCPFrontProxyKubeconfig Capability = "FRONTPROXY_KUBECONFIG" // KCPShardKubeconfig declares that the test requires the // SHARD_KUBECONFIG env var to be set. KCPShardKubeconfig Capability = "SHARD_KUBECONFIG" )
type Config ¶
type Config struct {
// FrontProxyKubeconfig is the rest.Config of a kcp front-proxy
FrontProxyKubeconfig *rest.Config
// ShardKubeconfig is the rest.Config of a kcp shard
ShardKubeconfig *rest.Config
}
Config holds the resolved configuration based on the capabilities requested in Require. Only fields corresponding to requested capabilities are guaranteed to be populated.
func Require ¶
func Require(t *testing.T, caps ...Capability) *Config
Require validates that all environment variables required by the given capabilities have been provided and returns a Config populated with the corresponding values. It calls t.Fatal if any required env var is missing or a kubeconfig cannot be loaded.
Click to show internal directories.
Click to hide internal directories.