testutil

package
Version: v4.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 1, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Layer1 = "tarsum.dev+sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
	Layer2 = "tarsum.dev+sha256:b194de3772ebbcdc8f244f663669799ac1cb141834b7cb8b69100285d357a2b0"
	Layer3 = "tarsum.dev+sha256:c937c4bb1c1a21cc6d94340812262c6472092028972ae69b551b1a70d4276171"
	Layer4 = "tarsum.dev+sha256:2aaacc362ac6be2b9e9ae8c6029f6f616bb50aec63746521858e47841b90fabd"
	Layer5 = "tarsum.dev+sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
)

Variables

View Source
var (
	Config1 = "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749"
	Config2 = "sha256:8ddc19f16526912237dd8af81971d5e4dd0587907234be2b83e249518d5b673f"
)

Functions

func AgedImage

func AgedImage(id, ref string, ageInMinutes int64, layers ...string) imagev1.Image

AgedImage creates a test image with specified age.

func AgedPod

func AgedPod(namespace, name string, phase corev1.PodPhase, ageInMinutes int64, containerImages ...string) corev1.Pod

AgedPod creates and returns a pod of particular age.

func AgedStream

func AgedStream(registry, namespace, name string, ageInMinutes int64, tags []imagev1.NamedTagEventList) imagev1.ImageStream

Stream creates and returns a test ImageStream object of given age.

func BC

func BC(namespace, name, strategyType, fromKind, fromNamespace, fromName string) buildv1.BuildConfig

BC creates and returns a BuildConfig object.

func BCList

BCList turns the given build configs into BuildConfigList.

func Build

func Build(namespace, name, strategyType, fromKind, fromNamespace, fromName string) buildv1.Build

Build creates and returns a Build object.

func BuildList

func BuildList(builds ...buildv1.Build) buildv1.BuildList

BuildList turns the given builds into BuildList.

func CommonSpec

func CommonSpec(strategyType, fromKind, fromNamespace, fromName string) buildv1.CommonSpec

CommonSpec creates and returns CommonSpec object.

func CreatedImage

func CreatedImage(id, ref string, created time.Time, layers ...string) imagev1.Image

CreatedImage creates a test image with the CreationTime set to the given timestamp.

func DC

func DC(namespace, name string, containerImages ...string) appsv1.DeploymentConfig

DC creates and returns a DeploymentConfig object.

func DCList

DCList turns the given deployment configs into DeploymentConfigList.

func DS

func DS(namespace, name string, containerImages ...string) kappsv1.DaemonSet

DS creates and returns a DaemonSet object.

func DSList

func DSList(dss ...kappsv1.DaemonSet) kappsv1.DaemonSetList

DSList turns the given daemon sets into DaemonSetList.

func Deployment

func Deployment(namespace, name string, containerImages ...string) kappsv1.Deployment

Deployment creates and returns aDeployment object.

func DeploymentList

func DeploymentList(deployments ...kappsv1.Deployment) kappsv1.DeploymentList

DeploymentList turns the given deployments into DeploymentList.

func Image

func Image(id, ref string) imagev1.Image

Image returns a default test image object 120 minutes old.

func ImageList

func ImageList(images ...imagev1.Image) imagev1.ImageList

ImageList turns the given images into ImageList.

func ImageWithLayers

func ImageWithLayers(id, ref string, configName *string, layers ...string) imagev1.Image

Image returns a default test image referencing the given layers.

func LimitList

func LimitList(limits ...int64) []*corev1.LimitRange

LimitList turns the given limits into LimitRanges.

func Pod

func Pod(namespace, name string, phase corev1.PodPhase, containerImages ...string) corev1.Pod

Pod creates and returns a pod having the given docker image references.

func PodList

func PodList(pods ...corev1.Pod) corev1.PodList

PodList turns the given pods into PodList.

func PodSpec

func PodSpec(containerImages ...string) corev1.PodSpec

PodSpec creates a pod specification having the given docker image references.

func PodSpecInternal

func PodSpecInternal(containerImages ...string) corev1.PodSpec

PodSpecInternal creates a pod specification having the given docker image references.

func RC

func RC(namespace, name string, containerImages ...string) corev1.ReplicationController

RC creates and returns a ReplicationController.

func RCList

RCList turns the given replication controllers into RCList.

func RS

func RS(namespace, name string, containerImages ...string) kappsv1.ReplicaSet

RS creates and returns a ReplicaSet object.

func RSList

RSList turns the given replica set into ReplicaSetList.

func SizedImage

func SizedImage(id, ref string, size int64, configName *string) imagev1.Image

SizedImage returns a test image of given size.

func Stream

func Stream(registry, namespace, name string, tags []imagev1.NamedTagEventList) imagev1.ImageStream

Stream creates and returns a test ImageStream object 1 minute old

func StreamList

func StreamList(streams ...imagev1.ImageStream) imagev1.ImageStreamList

StreamList turns the given streams into StreamList.

func StreamPtr

func StreamPtr(registry, namespace, name string, tags []imagev1.NamedTagEventList) *imagev1.ImageStream

Stream creates an ImageStream object and returns a pointer to it.

func Tag

func Tag(name string, events ...imagev1.TagEvent) imagev1.NamedTagEventList

Tag creates tag entries for Tags function.

func TagEvent

func TagEvent(id, ref string) imagev1.TagEvent

TagEvent creates a TagEvent object.

func UnmanagedImage

func UnmanagedImage(id, ref string, hasAnnotations bool, annotation, value string) imagev1.Image

UnmanagedImage creates a test image object lacking managed by OpenShift annotation.

func YoungTagEvent

func YoungTagEvent(id, ref string, created metav1.Time) imagev1.TagEvent

YoungTagEvent creates a TagEvent with the given created timestamp.

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL