testutil

package
v3.7.0-0.178.1+incompa... Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const BaseImageWith1Layer = `` /* 2161-byte string literal not displayed */
View Source
const BaseImageWith1LayerDigest = `sha256:c5207ce0f38da269ad2e58f143b5ea4b314c75ce1121384369f0db9015e10e82`

1 data layer of 128 B

View Source
const BaseImageWith2Layers = `` /* 2684-byte string literal not displayed */
View Source
const BaseImageWith2LayersDigest = "sha256:77371f61c054608a4bb1a96b99f9be69f0868340f5c924ecd8813172f7cf853d"

2 data layers, the first is shared with baseImageWith1Layer, total size of 240 B

View Source
const ChildImageWith2Layers = `` /* 3147-byte string literal not displayed */
View Source
const ChildImageWith2LayersDigest = "sha256:a9f073fbf2c9835711acd09081d87f5b7129ac6269e0df834240000f48abecd4"

based on baseImageWith1Layer, it adds a new data layer of 126 B

View Source
const ChildImageWith3Layers = `` /* 3662-byte string literal not displayed */
View Source
const ChildImageWith3LayersDigest = "sha256:2282a6d553353756fa43ba8672807d3fe81f8fdef54b0f6a360d64aaef2f243a"

based on baseImageWith2Layers, it adds a new data layer of 70 B

View Source
const InternalRegistryURL = "172.30.12.34:5000"

InternalRegistryURL is an url of internal docker registry for testing purposes.

View Source
const MiscImage = `` /* 2736-byte string literal not displayed */
View Source
const MiscImageDigest = "sha256:2643199e5ed5047eeed22da854748ed88b3a63ba0497601ba75852f7b92d4640"

another base image with unique data layer of 554 B

Variables

This section is empty.

Functions

func ExpectedResourceListFor

func ExpectedResourceListFor(expectedISCount int64) kapi.ResourceList

ExpectedResourceListFor creates a resource list with for image stream quota with given values.

func GetFakeImageStreamGetHandler

func GetFakeImageStreamGetHandler(t *testing.T, iss ...imageapi.ImageStream) clientgotesting.ReactionFunc

GetFakeImageStreamGetHandler creates a test handler to be used as a reactor with core.Fake client that handles Get request on image stream resource. Matching is from given image stream list will be returned if found. Additionally, a shared image stream may be requested.

func GetFakeImageStreamListHandler

func GetFakeImageStreamListHandler(t *testing.T, iss ...imageapi.ImageStream) clientgotesting.ReactionFunc

GetFakeImageStreamListHandler creates a test handler that lists given image streams matching requested namespace. Additionally, a shared image stream will be listed if the requested namespace is "shared".

func GetSharedImageStream

func GetSharedImageStream(namespace, name string) *imageapi.ImageStream

GetSharedImageStream returns an image stream having all the testing images tagged in its status under latest tag.

func MakeDockerImageReference

func MakeDockerImageReference(ns, isName, imageID string) string

MakeDockerImageReference makes a docker image reference string referencing testing internal docker registry.

Types

type FakeImageStreamLimitVerifier

type FakeImageStreamLimitVerifier struct {
	ImageStreamEvaluator func(ns string, is *imageapi.ImageStream) error
	Err                  error
}

func (*FakeImageStreamLimitVerifier) VerifyLimits

Jump to

Keyboard shortcuts

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