testutil

package
v3.11.0-0.6.0+incompat... Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2018 License: Apache-2.0 Imports: 11 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) imageapi.Image

AgedImage creates a test image with specified age.

func AgedPod

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

AgedPod creates and returns a pod of particular age.

func AgedStream

func AgedStream(registry, namespace, name string, ageInMinutes int64, tags map[string]imageapi.TagEventList) imageapi.ImageStream

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

func BC

func BC(namespace, name, strategyType, fromKind, fromNamespace, fromName string) buildapi.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) buildapi.Build

Build creates and returns a Build object.

func BuildList

func BuildList(builds ...buildapi.Build) buildapi.BuildList

BuildList turns the given builds into BuildList.

func CommonSpec

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

CommonSpec creates and returns CommonSpec object.

func CreatedImage

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

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

func DC

func DC(namespace, name string, containerImages ...string) appsapi.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) kapisext.DaemonSet

DS creates and returns a DaemonSet object.

func DSList

DSList turns the given daemon sets into DaemonSetList.

func Deployment

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

Deployment creates and returns aDeployment object.

func DeploymentList

func DeploymentList(deployments ...kapisext.Deployment) kapisext.DeploymentList

DeploymentList turns the given deployments into DeploymentList.

func Image

func Image(id, ref string) imageapi.Image

Image returns a default test image object 120 minutes old.

func ImageList

func ImageList(images ...imageapi.Image) imageapi.ImageList

ImageList turns the given images into ImageList.

func ImageWithLayers

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

Image returns a default test image referencing the given layers.

func LimitList

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

LimitList turns the given limits into LimitRanges.

func Pod

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

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

func PodList

func PodList(pods ...kapi.Pod) kapi.PodList

PodList turns the given pods into PodList.

func PodSpec

func PodSpec(containerImages ...string) kapi.PodSpec

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

func RC

func RC(namespace, name string, containerImages ...string) kapi.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) kapisext.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) imageapi.Image

SizedImage returns a test image of given size.

func Stream

func Stream(registry, namespace, name string, tags map[string]imageapi.TagEventList) imageapi.ImageStream

Stream creates and returns a test ImageStream object 1 minute old

func StreamList

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

StreamList turns the given streams into StreamList.

func StreamPtr

func StreamPtr(registry, namespace, name string, tags map[string]imageapi.TagEventList) *imageapi.ImageStream

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

func Tag

func Tag(name string, events ...imageapi.TagEvent) namedTagEventList

Tag creates tag entries for Tags function.

func TagEvent

func TagEvent(id, ref string) imageapi.TagEvent

TagEvent creates a TagEvent object.

func Tags

func Tags(list ...namedTagEventList) map[string]imageapi.TagEventList

Tags creates a map of tags for image stream status.

func UnmanagedImage

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

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

func YoungTagEvent

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

YoungTagEvent creates a TagEvent with the given created timestamp.

Types

This section is empty.

Jump to

Keyboard shortcuts

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