testbeta

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const BuildBSMinimal = `` /* 271-byte string literal not displayed */

BuildBSMinimal defines a Build with a BuildStrategy

View Source
const BuildBSMinimalNoSource = `` /* 182-byte string literal not displayed */

BuildBSMinimalNoSource defines a Build with a BuildStrategy without source

View Source
const BuildCBSMinimal = `` /* 307-byte string literal not displayed */

BuildCBSMinimal defines a Build with a ClusterBuildStrategy

View Source
const BuildCBSMinimalWithFakeSecret = `` /* 306-byte string literal not displayed */

BuildCBSMinimalWithFakeSecret defines a Build with a ClusterBuildStrategy and an not existing secret

View Source
const BuildCBSWithBuildRunDeletion = `` /* 317-byte string literal not displayed */

BuildCBSWithBuildRunDeletion defines a Build with a ClusterBuildStrategy and the annotation for automatic BuildRun deletion

View Source
const BuildCBSWithShortTimeOut = `` /* 292-byte string literal not displayed */

BuildCBSWithShortTimeOut defines a Build with a ClusterBuildStrategy and a short timeout

View Source
const BuildCBSWithShortTimeOutAndRefOutputSecret = `` /* 321-byte string literal not displayed */

BuildCBSWithShortTimeOutAndRefOutputSecret defines a Build with a ClusterBuildStrategy, a short timeout and an output secret

View Source
const BuildCBSWithVerifyRepositoryAnnotation = `` /* 260-byte string literal not displayed */

BuildCBSWithVerifyRepositoryAnnotation defines a Build with the verify repository annotation key

View Source
const BuildCBSWithWrongURL = `` /* 349-byte string literal not displayed */

BuildCBSWithWrongURL defines a Build with a ClusterBuildStrategy and a non-existing url

View Source
const BuildCBSWithoutVerifyRepositoryAnnotation = `` /* 189-byte string literal not displayed */

BuildCBSWithoutVerifyRepositoryAnnotation defines a minimal Build without source url and annotation

View Source
const BuildStrategyWithErrorResult = `` /* 402-byte string literal not displayed */

BuildStrategyWithErrorResult is a strategy that always fails and surfaces and error reason and message to the user

View Source
const BuildStrategyWithParameterVerification = `` /* 1582-byte string literal not displayed */

BuildStrategyWithParameterVerification is a strategy that verifies that parameters can be used at all expected places

View Source
const BuildStrategyWithParameters = `` /* 685-byte string literal not displayed */

BuildStrategyWithParameters is a strategy that uses a sleep command with a value for its spec.parameters

View Source
const BuildStrategyWithoutDefaultInParameter = `` /* 311-byte string literal not displayed */

BuildStrategyWithoutDefaultInParameter is a strategy that uses a sleep command with a value from its spec.parameters, where the parameter have no default

View Source
const BuildStrategyWithoutPush = `` /* 296-byte string literal not displayed */

BuildStrategyWithoutPush is a strategy that writes an image tarball and pushes nothing

View Source
const BuildWithArrayParam = `` /* 355-byte string literal not displayed */

BuildWithArrayParam defines a Build with an array parameter

View Source
const BuildWithBuilderRefSecret = `` /* 360-byte string literal not displayed */

BuildWithBuilderRefSecret defines a Build with a referenced secret under spec.builder

View Source
const BuildWithConfigMapSecretParams = `` /* 508-byte string literal not displayed */

BuildWithConfigMapSecretParams defines a Build with parameter values referencing a ConfigMap and Secret

View Source
const BuildWithDisableVulnerabilityScan = `` /* 233-byte string literal not displayed */

BuildWithVulnerabilityScanOptions defines a Build with vulnerability scan options

View Source
const BuildWithEmptyStringParam = `` /* 321-byte string literal not displayed */

BuildWithEmptyStringParam defines a param that with an empty string value

View Source
const BuildWithMultipleRefSecrets = `` /* 393-byte string literal not displayed */

BuildWithMultipleRefSecrets defines a Build with multiple referenced secrets under spec

View Source
const BuildWithOutputRefSecret = `` /* 322-byte string literal not displayed */

BuildWithOutputRefSecret defines a Build with a referenced secret under spec.output

View Source
const BuildWithRestrictedParam = `` /* 363-byte string literal not displayed */

BuildWithRestrictedParam defines a Build using params that are reserved only for shipwright

View Source
const BuildWithSleepTimeParam = `` /* 323-byte string literal not displayed */

BuildWithSleepTimeParam defines a Build with a parameter

View Source
const BuildWithSleepTimeParamAndCBS = `` /* 330-byte string literal not displayed */

BuildWithSleepTimeParamAndCBS defines a Build with a parameter

View Source
const BuildWithSourceRefSecret = `` /* 325-byte string literal not displayed */

BuildWithSourceRefSecret defines a Build with a referenced secret under spec.source

View Source
const BuildWithUndefinedParam = `` /* 322-byte string literal not displayed */

BuildWithUndefinedParameter defines a param that was not declared under the strategy parameters

View Source
const BuildWithUndefinedParamAndCBS = `` /* 329-byte string literal not displayed */

BuildWithUndefinedParamAndCBS defines a param that was not declared under the strategy parameters of a ClusterBuildStrategy

View Source
const BuildWithVulnerabilityScanOptions = `` /* 258-byte string literal not displayed */

BuildWithVulnerabilityScanOptions defines a Build with vulnerability scan options

View Source
const BuildahBuildRunWithOutputImageLabelsAndAnnotations = `` /* 406-byte string literal not displayed */

BuildahBuildRunWithOutputImageLabelsAndAnnotations defines a BuildRun with a output image labels and annotation

View Source
const BuildahBuildRunWithSA = `` /* 184-byte string literal not displayed */

BuildahBuildRunWithSA defines a BuildRun with a service-account

View Source
const BuildahBuildRunWithSAAndOutput = `` /* 280-byte string literal not displayed */

BuildahBuildRunWithSAAndOutput defines a BuildRun with a service-account and output overrides

View Source
const BuildahBuildRunWithTimeOutAndSA = `` /* 198-byte string literal not displayed */

BuildahBuildRunWithTimeOutAndSA defines a BuildRun with a service-account and timeout

View Source
const BuildahBuildStrategySingleStep = `` /* 1091-byte string literal not displayed */

BuildahBuildStrategySingleStep defines a BuildStrategy for Buildah with a single step and container resources

View Source
const BuildahBuildWithAnnotationAndLabel = `` /* 519-byte string literal not displayed */

BuildahBuildWithAnnotationAndLabel defines a simple Build with a source, strategy, output, annotations and labels

View Source
const BuildahBuildWithMultipleAnnotationAndLabel = `` /* 635-byte string literal not displayed */

BuildahBuildWithMultipleAnnotationAndLabel defines a Build with a source, strategy, output, multiple annotations and labels

View Source
const BuildahBuildWithOutput = `` /* 315-byte string literal not displayed */

BuildahBuildWithOutput defines a simple Build with a source, strategy and output

View Source
const BuildahBuildWithTimeOut = `` /* 330-byte string literal not displayed */

BuildahBuildWithTimeOut defines a Build for Buildah with source, strategy, output and timeout

View Source
const BuildpacksBuildRunWithSA = `` /* 196-byte string literal not displayed */

BuildpacksBuildRunWithSA defines a BuildRun with a service-account

View Source
const BuildpacksBuildStrategySingleStep = `` /* 718-byte string literal not displayed */

BuildpacksBuildStrategySingleStep defines a BuildStrategy for Buildpacks with a single step and container resources

View Source
const BuildpacksBuildWithBuilderAndTimeOut = `` /* 402-byte string literal not displayed */

BuildpacksBuildWithBuilderAndTimeOut defines a Build with source, strategy, builder, output and timeout

View Source
const ClusterBuildStrategyForVulnerabilityScanning = `` /* 701-byte string literal not displayed */

ClusterBuildStrategyForVulnerabilityScanning is a strategy that does nothing and has no dependencies

View Source
const ClusterBuildStrategyNoOp = `` /* 824-byte string literal not displayed */

ClusterBuildStrategyNoOp is a strategy that does nothing and has no dependencies

View Source
const ClusterBuildStrategySingleStep = `` /* 1270-byte string literal not displayed */

ClusterBuildStrategySingleStep defines a BuildStrategy for Buildah with a single step and container resources

View Source
const ClusterBuildStrategySingleStepKaniko = `` /* 1078-byte string literal not displayed */

ClusterBuildStrategySingleStepKaniko is a cluster build strategy based on Kaniko, which is very close to the actual Kaniko build strategy example in the project

View Source
const ClusterBuildStrategySingleStepKanikoError = `` /* 1081-byte string literal not displayed */

ClusterBuildStrategySingleStepKanikoError is a Kaniko based cluster build strategy that has a configuration error (misspelled command flag) so that it will fail in Tekton

View Source
const ClusterBuildStrategySleep30s = `` /* 311-byte string literal not displayed */

ClusterBuildStrategySleep30s is a strategy that does only sleep 30 seconds

View Source
const ClusterBuildStrategyWithAnnotations = `` /* 1250-byte string literal not displayed */

ClusterBuildStrategyWithAnnotations is a cluster build strategy that contains annotations

View Source
const ClusterBuildStrategyWithParameters = `` /* 316-byte string literal not displayed */

ClusterBuildStrategyWithParameters is a strategy that uses a sleep command with a value for its spec.parameters

View Source
const MinimalBuild = `` /* 189-byte string literal not displayed */

MinimalBuild defines a simple Build with a strategy output

View Source
const MinimalBuildRun = `
apiVersion: shipwright.io/v1beta1
kind: BuildRun
spec:
  build:
    name: foobar
`

MinimalBuildRun defines a minimal BuildRun with a reference to a not existing Build

View Source
const MinimalBuildRunRetention = `` /* 135-byte string literal not displayed */

MinimalBuildRunRetention defines a minimal BuildRun with a reference used to test retention fields

View Source
const MinimalBuildRunRetentionTTLFive = `` /* 197-byte string literal not displayed */

MinimalBuildRunRetention defines a minimal BuildRun with a reference used to test retention fields

View Source
const MinimalBuildRunWithNodeSelector = `` /* 128-byte string literal not displayed */

MinimalBuildRunWithNodeSelector defines a minimal BuildRun with a reference to a not existing Build, and a nodeSelector

View Source
const MinimalBuildRunWithOutput = `
apiVersion: shipwright.io/v1beta1
kind: BuildRun
spec:
  output:
    image: foobar.registry.com
  build:
    name: foobar
`

MinimalBuildRunWithOutput defines a BuildRun with an override for the Build Output

View Source
const MinimalBuildRunWithParams = `` /* 134-byte string literal not displayed */

MinimalBuildRunWithParams defines a param override

View Source
const MinimalBuildRunWithReservedParams = `` /* 138-byte string literal not displayed */
View Source
const MinimalBuildRunWithSAGeneration = `
apiVersion: shipwright.io/v1beta1
kind: BuildRun
spec:
  serviceAccount: ".generate"
  build:
    name: foobar
`

MinimalBuildRunWithSAGeneration defines a minimal BuildRun with a reference to a not existing Build

View Source
const MinimalBuildRunWithSpecifiedServiceAccount = `
apiVersion: shipwright.io/v1beta1
kind: BuildRun
spec:
  build:
    name: buildah
  serviceAccount: foobar
`

MinimalBuildRunWithSpecifiedServiceAccount defines a minimal BuildRun with a reference to a not existing serviceAccount

View Source
const MinimalBuildRunWithTimeOut = `
apiVersion: shipwright.io/v1beta1
kind: BuildRun
spec:
  timeout: 1s
  build:
    name: foobar
`

MinimalBuildRunWithTimeOut defines a BuildRun with an override for the Build Timeout

View Source
const MinimalBuildRunWithVulnerabilityScan = `` /* 244-byte string literal not displayed */

MinimalBuildRunWithVulnerabilityScan defines a BuildRun with an override for the Build Output

View Source
const MinimalBuildWithNodeSelector = `` /* 235-byte string literal not displayed */

MinimalBuildWithNodeSelector defines a simple Build with a strategy, output, and NodeSelector

View Source
const MinimalBuildWithRetentionLimitDiff = `` /* 401-byte string literal not displayed */

MinimalBuildWithRetentionLimitDiff defines a simple Build with a source, a strategy and different failed and succeeded limits

View Source
const MinimalBuildWithRetentionLimitOne = `` /* 401-byte string literal not displayed */

MinimalBuildWithRetentionLimitOne defines a simple Build with a source, a strategy and limits set as 1

View Source
const MinimalBuildWithRetentionTTLFive = `` /* 407-byte string literal not displayed */

MinimalBuildWithRetentionTTLFive defines a simple Build with a source, a strategy and ttl

View Source
const MinimalBuildWithRetentionTTLOneMin = `` /* 407-byte string literal not displayed */

MinimalBuildWithRetentionTTL defines a simple Build with a source, a strategy ttl

View Source
const MinimalBuildahBuild = `` /* 287-byte string literal not displayed */

MinimalBuildahBuild defines a simple Build with a source and a strategy

View Source
const MinimalBuildahBuildRun = `
apiVersion: shipwright.io/v1beta1
kind: BuildRun
metadata:
  name: buildah-run
spec:
  build:
    name: buildah
`

MinimalBuildahBuildRun defines a simple BuildRun with a referenced Build

View Source
const MinimalBuildahBuildRunWithEnvVars = `` /* 272-byte string literal not displayed */

MinimalBuildahBuildRunWithEnvVars defines a simple BuildRun with a referenced Build and env vars

View Source
const MinimalBuildahBuildRunWithExitCode = `` /* 169-byte string literal not displayed */
View Source
const MinimalBuildahBuildRunWithNodeSelector = `` /* 159-byte string literal not displayed */

MinimalBuildahBuildRunWithNodeSelector defines a simple BuildRun with a referenced Build and nodeSelector

View Source
const MinimalBuildahBuildStrategy = `` /* 1407-byte string literal not displayed */

MinimalBuildahBuildStrategy defines a BuildStrategy for Buildah with two steps each of them with different container resources

View Source
const MinimalBuildahBuildStrategyWithEnvs = `` /* 1433-byte string literal not displayed */

MinimalBuildahBuildStrategyWithEnvs defines a BuildStrategy for Buildah with two steps each of them with different container resources and env vars

View Source
const MinimalBuildahBuildWithEnvVars = `` /* 443-byte string literal not displayed */

MinimalBuildahBuildWithEnvVars defines a simple Build with a source, strategy, and env vars

View Source
const MinimalBuildahBuildWithNodeSelector = `` /* 275-byte string literal not displayed */

MinimalBuildahBuildWithNodeSelector defines a simple Build with a source, strategy, and nodeSelector

View Source
const MinimalBuildahClusterBuildStrategy = `` /* 1263-byte string literal not displayed */

MinimalBuildahClusterBuildStrategy defines a BuildStrategy for Buildah with two steps each of them with different container resources

View Source
const MinimalOneOffBuildRun = `` /* 425-byte string literal not displayed */
View Source
const OneOffBuildRunWithVulnerabilityScan = `` /* 330-byte string literal not displayed */

MinimalBuildRunWithVulnerabilityScan defines a BuildRun with an override for the Build Output

Variables

This section is empty.

Functions

This section is empty.

Types

type Catalog

type Catalog struct{}

Catalog allows you to access helper functions

func (*Catalog) BuildRunWithBuildSnapshot

func (c *Catalog) BuildRunWithBuildSnapshot(buildRunName string, buildName string) *build.BuildRun

BuildRunWithBuildSnapshot returns BuildRun Object with a populated BuildSpec in the Status field

func (*Catalog) BuildRunWithExistingOwnerReferences

func (c *Catalog) BuildRunWithExistingOwnerReferences(buildRunName string, buildName string, ownerName string) *build.BuildRun

BuildRunWithExistingOwnerReferences returns a BuildRun object that is already owned by some fake object

func (*Catalog) BuildRunWithFakeNamespace

func (c *Catalog) BuildRunWithFakeNamespace(buildRunName string, buildName string) *build.BuildRun

BuildRunWithFakeNamespace returns a BuildRun object with a namespace that does not exist

func (*Catalog) BuildRunWithSA

func (c *Catalog) BuildRunWithSA(buildRunName string, buildName string, saName string) *build.BuildRun

BuildRunWithSA returns a customized BuildRun object that defines a service account

func (*Catalog) BuildRunWithSAGenerate

func (c *Catalog) BuildRunWithSAGenerate(buildRunName string, buildName string) *build.BuildRun

BuildRunWithSAGenerate returns a customized BuildRun object that defines a service account

func (*Catalog) BuildRunWithSucceededCondition

func (c *Catalog) BuildRunWithSucceededCondition() *build.BuildRun

BuildRunWithSucceededCondition returns a BuildRun with a single condition of the type Succeeded

func (*Catalog) BuildRunWithoutSA

func (c *Catalog) BuildRunWithoutSA(buildRunName string, buildName string) *build.BuildRun

BuildRunWithoutSA returns a buildrun without serviceAccountName and generate serviceAccount is false

func (*Catalog) BuildWithBuildRunDeletions

func (c *Catalog) BuildWithBuildRunDeletions(buildName string, strategyName string, strategyKind build.BuildStrategyKind) *build.Build

BuildWithBuildRunDeletions returns a minimal Build object with the build.shipwright.io/build-run-deletion annotation set to true

func (*Catalog) BuildWithBuildRunDeletionsAndFakeNS

func (c *Catalog) BuildWithBuildRunDeletionsAndFakeNS(buildName string, strategyName string, strategyKind build.BuildStrategyKind) *build.Build

BuildWithBuildRunDeletionsAndFakeNS returns a minimal Build object with the build.shipwright.io/build-run-deletion annotation set to true in a fake namespace

func (*Catalog) BuildWithBuildStrategy

func (c *Catalog) BuildWithBuildStrategy(name string, ns string, strategyName string) *build.Build

BuildWithBuildStrategy gives you an specific Build CRD

func (*Catalog) BuildWithClusterBuildStrategy

func (c *Catalog) BuildWithClusterBuildStrategy(name string, ns string, strategyName string, secretName string) *build.Build

BuildWithClusterBuildStrategy gives you an specific Build CRD

func (*Catalog) BuildWithClusterBuildStrategyAndFalseSourceAnnotation

func (c *Catalog) BuildWithClusterBuildStrategyAndFalseSourceAnnotation(name string, ns string, strategyName string) *build.Build

BuildWithClusterBuildStrategyAndFalseSourceAnnotation gives you an specific Build CRD

func (*Catalog) BuildWithClusterBuildStrategyAndSourceSecret

func (c *Catalog) BuildWithClusterBuildStrategyAndSourceSecret(name string, ns string, strategyName string) *build.Build

BuildWithClusterBuildStrategyAndSourceSecret gives you an specific Build CRD

func (*Catalog) BuildWithNilBuildStrategyKind

func (c *Catalog) BuildWithNilBuildStrategyKind(name string, ns string, strategyName string) *build.Build

BuildWithNilBuildStrategyKind gives you an Build CRD with nil build strategy kind

func (*Catalog) BuildWithOutputSecret

func (c *Catalog) BuildWithOutputSecret(name string, ns string, secretName string) *build.Build

BuildWithOutputSecret ....

func (*Catalog) BuildWithoutStrategyKind

func (c *Catalog) BuildWithoutStrategyKind(buildName string, strategyName string) *build.Build

BuildWithoutStrategyKind returns a minimal Build object without an strategy kind definition

func (*Catalog) ClusterBuildStrategy

func (c *Catalog) ClusterBuildStrategy(name string) *build.ClusterBuildStrategy

ClusterBuildStrategy to support tests

func (*Catalog) ConfigMapWithData

func (c *Catalog) ConfigMapWithData(name string, ns string, data map[string]string) *corev1.ConfigMap

ConfigMapWithData creates a ConfigMap with data

func (*Catalog) DefaultBuild

func (c *Catalog) DefaultBuild(buildName string, strategyName string, strategyKind build.BuildStrategyKind) *build.Build

DefaultBuild returns a minimal Build object

func (*Catalog) DefaultBuildRun

func (c *Catalog) DefaultBuildRun(buildRunName string, buildName string) *build.BuildRun

DefaultBuildRun returns a minimal BuildRun object

func (*Catalog) DefaultBuildWithFalseRegistered

func (c *Catalog) DefaultBuildWithFalseRegistered(buildName string, strategyName string, strategyKind build.BuildStrategyKind) *build.Build

DefaultBuildWithFalseRegistered returns a minimal Build object with a FALSE Registered

func (*Catalog) DefaultClusterBuildStrategy

func (c *Catalog) DefaultClusterBuildStrategy() *build.ClusterBuildStrategy

DefaultClusterBuildStrategy returns a minimal ClusterBuildStrategy object with a inmutable name

func (*Catalog) DefaultNamespacedBuildStrategy

func (c *Catalog) DefaultNamespacedBuildStrategy() *build.BuildStrategy

DefaultNamespacedBuildStrategy returns a minimal BuildStrategy object with a inmutable name

func (*Catalog) DefaultServiceAccount

func (c *Catalog) DefaultServiceAccount(name string) *corev1.ServiceAccount

DefaultServiceAccount returns a minimal SA object

func (*Catalog) DefaultTaskRun

func (c *Catalog) DefaultTaskRun(taskRunName string, ns string) *pipelineapi.TaskRun

DefaultTaskRun returns a minimal TaskRun object

func (*Catalog) DefaultTaskRunWithFalseStatus

func (c *Catalog) DefaultTaskRunWithFalseStatus(trName string, buildRunName string, ns string) *pipelineapi.TaskRun

DefaultTaskRunWithFalseStatus returns a minimal tektont TaskRun with a FALSE status

func (*Catalog) DefaultTaskRunWithStatus

func (c *Catalog) DefaultTaskRunWithStatus(trName string, buildRunName string, ns string, status corev1.ConditionStatus, reason string) *pipelineapi.TaskRun

DefaultTaskRunWithStatus returns a minimal tekton TaskRun with an Status

func (*Catalog) FakeClusterBuildStrategyNotFound

func (c *Catalog) FakeClusterBuildStrategyNotFound(name string) error

FakeClusterBuildStrategyNotFound returns a not found error

func (*Catalog) LoadBRWithNameAndRef

func (c *Catalog) LoadBRWithNameAndRef(name string, buildName string, d []byte) (*build.BuildRun, error)

LoadBRWithNameAndRef returns a populated BuildRun with a name and a referenced Build

func (*Catalog) LoadBuildRunFromBytes

func (c *Catalog) LoadBuildRunFromBytes(d []byte) (*build.BuildRun, error)

LoadBuildRunFromBytes returns a populated BuildRun

func (*Catalog) LoadBuildStrategyFromBytes

func (c *Catalog) LoadBuildStrategyFromBytes(d []byte) (*build.BuildStrategy, error)

LoadBuildStrategyFromBytes returns a populated BuildStrategy

func (*Catalog) LoadBuildWithNameAndStrategy

func (c *Catalog) LoadBuildWithNameAndStrategy(name string, strategy string, d []byte) (*build.Build, error)

LoadBuildWithNameAndStrategy returns a populated Build with name and a referenced strategy

func (*Catalog) LoadBuildYAML

func (c *Catalog) LoadBuildYAML(d []byte) (*build.Build, error)

LoadBuildYAML parses YAML bytes into JSON and from JSON into a Build struct

func (*Catalog) LoadCBSWithName

func (c *Catalog) LoadCBSWithName(name string, d []byte) (*build.ClusterBuildStrategy, error)

LoadCBSWithName returns a populated ClusterBuildStrategy with a name

func (*Catalog) LoadCustomResources

func (c *Catalog) LoadCustomResources(cpu string, mem string) corev1.ResourceRequirements

LoadCustomResources returns a container set of resources based on cpu and memory

func (*Catalog) LoadStandAloneBuildRunWithNameAndStrategy

func (c *Catalog) LoadStandAloneBuildRunWithNameAndStrategy(name string, strategy *build.ClusterBuildStrategy, d []byte) (*build.BuildRun, error)

func (*Catalog) PodWithInitContainerStatus

func (c *Catalog) PodWithInitContainerStatus(podName string, initContainerName string) *corev1.Pod

PodWithInitContainerStatus returns a pod with a single entry under the Status field for InitContainer Status

func (*Catalog) SecretWithAnnotation

func (c *Catalog) SecretWithAnnotation(name string, ns string) *corev1.Secret

SecretWithAnnotation gives you a secret with build annotation

func (*Catalog) SecretWithDockerConfigJson

func (c *Catalog) SecretWithDockerConfigJson(name string, ns string, host string, username string, password string) *corev1.Secret

SecretWithDockerConfigJson creates a secret of type dockerconfigjson

func (*Catalog) SecretWithStringData

func (c *Catalog) SecretWithStringData(name string, ns string, stringData map[string]string) *corev1.Secret

SecretWithStringData creates a Secret with stringData (not base64 encoded)

func (*Catalog) SecretWithoutAnnotation

func (c *Catalog) SecretWithoutAnnotation(name string, ns string) *corev1.Secret

SecretWithoutAnnotation gives you a secret without build annotation

func (*Catalog) ServiceAccountWithControllerRef

func (c *Catalog) ServiceAccountWithControllerRef(name string) *corev1.ServiceAccount

ServiceAccountWithControllerRef ... TODO

func (*Catalog) StubBuildAndTaskRun

func (c *Catalog) StubBuildAndTaskRun(
	b *build.Build,
	tr *pipelineapi.TaskRun,
) func(context context.Context, nn types.NamespacedName, object client.Object, getOptions ...client.GetOption) error

StubBuildAndTaskRun is used to simulate the existence of a Build and a TaskRun when there is a client GET on this two objects

func (*Catalog) StubBuildCRDs

func (c *Catalog) StubBuildCRDs(
	b *build.Build,
	br *build.BuildRun,
	sa *corev1.ServiceAccount,
	cb *build.ClusterBuildStrategy,
	bs *build.BuildStrategy,
) func(context context.Context, nn types.NamespacedName, object client.Object, getOptions ...client.GetOption) error

func (*Catalog) StubBuildCRDsPodAndTaskRun

func (c *Catalog) StubBuildCRDsPodAndTaskRun(
	b *build.Build,
	br *build.BuildRun,
	sa *corev1.ServiceAccount,
	cb *build.ClusterBuildStrategy,
	bs *build.BuildStrategy,
	tr *pipelineapi.TaskRun,
	pod *corev1.Pod,
) func(context context.Context, nn types.NamespacedName, object client.Object, getOptions ...client.GetOption) error

StubBuildCRDsPodAndTaskRun stubs different objects in case a client GET call is executed against them

func (*Catalog) StubBuildRun

func (c *Catalog) StubBuildRun(
	b *build.BuildRun,
) func(context context.Context, nn types.NamespacedName, object client.Object, getOptions ...client.GetOption) error

StubBuildRun is used to simulate the existence of a BuildRun only when there is a client GET on this object type

func (*Catalog) StubBuildRunAndTaskRun

func (c *Catalog) StubBuildRunAndTaskRun(
	b *build.BuildRun,
	tr *pipelineapi.TaskRun,
) func(context context.Context, nn types.NamespacedName, object client.Object, getOptions ...client.GetOption) error

StubBuildRunAndTaskRun is used to simulate the existence of a BuildRun and a TaskRun when there is a client GET on this two objects

func (*Catalog) StubBuildRunGetWithSA

func (c *Catalog) StubBuildRunGetWithSA(
	b *build.Build,
	br *build.BuildRun,
	sa *corev1.ServiceAccount,
) func(context context.Context, nn types.NamespacedName, object client.Object, getOptions ...client.GetOption) error

StubBuildRunGetWithSA returns fake object for different client calls

func (*Catalog) StubBuildRunGetWithSAandStrategies

func (c *Catalog) StubBuildRunGetWithSAandStrategies(
	b *build.Build,
	br *build.BuildRun,
	sa *corev1.ServiceAccount,
	cb *build.ClusterBuildStrategy,
	bs *build.BuildStrategy,
) func(context context.Context, nn types.NamespacedName, object client.Object, getOptions ...client.GetOption) error

StubBuildRunGetWithSAandStrategies simulates the output of client GET calls for the BuildRun unit tests

func (*Catalog) StubBuildRunGetWithTaskRunAndSA

func (c *Catalog) StubBuildRunGetWithTaskRunAndSA(
	b *build.Build,
	br *build.BuildRun,
	tr *pipelineapi.TaskRun,
	sa *corev1.ServiceAccount,
) func(context context.Context, nn types.NamespacedName, object client.Object, getOptions ...client.GetOption) error

StubBuildRunGetWithTaskRunAndSA returns fake object for different client calls

func (*Catalog) StubBuildRunGetWithoutSA

func (c *Catalog) StubBuildRunGetWithoutSA(
	b *build.Build,
	br *build.BuildRun,
) func(context context.Context, nn types.NamespacedName, object client.Object, getOptions ...client.GetOption) error

StubBuildRunGetWithoutSA simulates the output of client GET calls for the BuildRun unit tests

func (*Catalog) StubBuildRunLabel

func (c *Catalog) StubBuildRunLabel(buildSample *build.Build) func(context context.Context, object client.Object, _ ...client.UpdateOption) error

StubBuildRunLabel asserts Label fields on a BuildRun resource

func (*Catalog) StubBuildRunStatus

func (c *Catalog) StubBuildRunStatus(reason string, name *string, condition build.Condition, status corev1.ConditionStatus, buildSpec build.BuildSpec, tolerateEmptyStatus bool) func(context context.Context, object client.Object, _ ...client.SubResourceUpdateOption) error

StubBuildRunStatus asserts Status fields on a BuildRun resource

func (*Catalog) StubBuildStatusReason

func (c *Catalog) StubBuildStatusReason(reason build.BuildReason, message string) func(context context.Context, object client.Object, _ ...client.SubResourceUpdateOption) error

StubBuildStatusReason asserts Status fields on a Build resource

func (*Catalog) StubBuildUpdateOwnerReferences

func (c *Catalog) StubBuildUpdateOwnerReferences(ownerKind string, ownerName string, isOwnerController *bool, blockOwnerDeletion *bool) func(context context.Context, object client.Object, _ ...client.UpdateOption) error

StubBuildUpdateOwnerReferences simulates and assert an updated BuildRun object ownerreferences

func (*Catalog) StubFunc

func (c *Catalog) StubFunc(status corev1.ConditionStatus, reason build.BuildReason, message string) func(context context.Context, object client.Object, _ ...client.SubResourceUpdateOption) error

StubFunc is used to simulate the status of the Build after a .Status().Update() call in the controller. This receives a parameter to return an specific status state

func (*Catalog) TaskRunWithCompletionAndStartTime

func (c *Catalog) TaskRunWithCompletionAndStartTime(trName string, buildRunName string, ns string) *pipelineapi.TaskRun

TaskRunWithCompletionAndStartTime provides a TaskRun object with a Completion and StartTime

func (*Catalog) TaskRunWithStatus

func (c *Catalog) TaskRunWithStatus(trName string, ns string) *pipelineapi.TaskRun

TaskRunWithStatus returns a minimal tekton TaskRun with an Status

Jump to

Keyboard shortcuts

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