kubernetesk8s.io/kubernetes/test/integration/util Index | Files

package util

import "k8s.io/kubernetes/test/integration/util"

Index

Constants

const (
	// TestProjectID is the project id used for creating NewMockGCECloud
	TestProjectID = "test-project"
	// TestNetworkProjectID is the network project id for creating NewMockGCECloud
	TestNetworkProjectID = "net-test-project"
	// TestRegion is the region for creating NewMockGCECloud
	TestRegion = "test-region"
	// TestZone is the zone for creating NewMockGCECloud
	TestZone = "test-zone"
	// TestNetworkName is the network name for creating NewMockGCECloud
	TestNetworkName = "test-network"
	// TestSubnetworkName is the sub network name for creating NewMockGCECloud
	TestSubnetworkName = "test-sub-network"
	// TestSecondaryRangeName is the secondary range name for creating NewMockGCECloud
	TestSecondaryRangeName = "test-secondary-range"
)

Functions

func NewMockGCECloud

func NewMockGCECloud(cloud cloud.Cloud) (*gce.GCECloud, error)

NewMockGCECloud returns a handle to a GCECloud instance that is served by a mock http server

Types

type ShutdownFunc

type ShutdownFunc func()

ShutdownFunc represents the function handle to be called, typically in a defer handler, to shutdown a running module

func StartApiserver

func StartApiserver() (string, ShutdownFunc)

StartApiserver starts a local API server for testing and returns the handle to the URL and the shutdown function to stop it.

func StartScheduler

func StartScheduler(clientSet clientset.Interface) (scheduler.Configurator, ShutdownFunc)

StartScheduler configures and starts a scheduler given a handle to the clientSet interface and event broadcaster. It returns a handle to the configurator for the running scheduler and the shutdown function to stop it.

Source Files

cloud.go util.go

Version
v1.11.4
Published
Oct 22, 2018
Platform
js/wasm
Imports
18 packages
Last checked
4 minutes ago

Tools for package owners.