testingutil

package
v1.0.0-alpha.0...-0be9a8d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2021 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateFakeContainer

func CreateFakeContainer(containerName string) corev1.Container

CreateFakeContainer creates a container with the given containerName

func FakeResourceRequirements

func FakeResourceRequirements(cpu, memory string) (corev1.ResourceRequirements, error)

FakeResourceRequirements creates a fake resource requirements from cpu and memory

func GetFakeContainerComponent

func GetFakeContainerComponent(name string) v1.Component

GetFakeContainerComponent returns a fake container component for testing.

func GetFakeEnv

func GetFakeEnv(name, value string) v1.EnvVar

GetFakeEnv returns a fake env for testing

func GetFakeEnvParentOverride

func GetFakeEnvParentOverride(name, value string) v1.EnvVarParentOverride

GetFakeEnvParentOverride returns a fake envParentOverride for testing

func GetFakeExecRunCommands

func GetFakeExecRunCommands() []v1.ExecCommand

GetFakeExecRunCommands returns fake commands for testing

func GetFakeVolumeComponent

func GetFakeVolumeComponent(name, size string) v1.Component

GetFakeVolumeComponent returns a fake volume component for testing

func GetFakeVolumeMount

func GetFakeVolumeMount(name, path string) v1.VolumeMount

GetFakeVolumeMount returns a fake volume mount for testing

func GetFakeVolumeMountParentOverride

func GetFakeVolumeMountParentOverride(name, path string) v1.VolumeMountParentOverride

GetFakeVolumeMountParentOverride returns a fake volumeMountParentOverride for testing

Types

type FakeK8sClient

type FakeK8sClient struct {
	client.Client         // To satisfy interface; override all used methods
	DevWorkspaceResources map[string]v1alpha2.DevWorkspaceTemplate
	Errors                map[string]string
}

func (*FakeK8sClient) Get

func (client *FakeK8sClient) Get(_ context.Context, namespacedName client.ObjectKey, obj client.Object) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL