testhelpers

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: Apache-2.0 Imports: 26 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompactJSON

func CompactJSON(spacedJSONStr string) string

Types

type CreateBuilderArgs

type CreateBuilderArgs struct {
	Context            context.Context
	BuilderKeychain    authn.Keychain
	StackKeychain      authn.Keychain
	Fetcher            cnb.RemoteBuildpackFetcher
	ClusterStack       *buildapi.ClusterStack
	BuilderSpec        buildapi.BuilderSpec
	SigningSecrets     []*corev1.Secret
	ResolvedBuilderTag string
}

type DiffOptions

type DiffOptions struct {
	Prefix string
	Color  bool
}

func DefaultDiffOptions

func DefaultDiffOptions() DiffOptions

type DiffOutBuilder

type DiffOutBuilder struct {
	// contains filtered or unexported fields
}

func NewDiffOutBuilder

func NewDiffOutBuilder(t *testing.T) *DiffOutBuilder

func (*DiffOutBuilder) Configure

func (d *DiffOutBuilder) Configure(options DiffOptions) *DiffOutBuilder

func (*DiffOutBuilder) New

func (d *DiffOutBuilder) New(str string) *DiffOutBuilder

func (*DiffOutBuilder) NoD

func (d *DiffOutBuilder) NoD(str string) *DiffOutBuilder

func (*DiffOutBuilder) Old

func (d *DiffOutBuilder) Old(str string) *DiffOutBuilder

func (*DiffOutBuilder) Out

func (d *DiffOutBuilder) Out() string

func (*DiffOutBuilder) Reset

func (d *DiffOutBuilder) Reset() *DiffOutBuilder

func (*DiffOutBuilder) Txt

func (d *DiffOutBuilder) Txt(str string) *DiffOutBuilder

type FakeBuilderCreator

type FakeBuilderCreator struct {
	Record         buildapi.BuilderRecord
	CreateErr      error
	ObjectsToTrack []corev1.ObjectReference

	CreateBuilderCalls []CreateBuilderArgs
}

func (*FakeBuilderCreator) CreateBuilder

func (f *FakeBuilderCreator) CreateBuilder(ctx context.Context, builderKeychain authn.Keychain, stackKeychain authn.Keychain, fetcher cnb.RemoteBuildpackFetcher, clusterStack *buildapi.ClusterStack, spec buildapi.BuilderSpec, signingSecrets []*corev1.Secret, resolvedBuilderTag string) (buildapi.BuilderRecord, error)

type FakeTracker

type FakeTracker struct {
	// contains filtered or unexported fields
}

func (*FakeTracker) IsTracking

func (f *FakeTracker) IsTracking(ref reconciler.Key, obj types.NamespacedName) bool

func (*FakeTracker) IsTrackingKind

func (f *FakeTracker) IsTrackingKind(kind schema.GroupKind, obj types.NamespacedName) bool

func (*FakeTracker) OnChanged

func (*FakeTracker) OnChanged(obj interface{})

func (FakeTracker) String

func (f FakeTracker) String() string

func (*FakeTracker) Track

func (f *FakeTracker) Track(ref reconciler.Key, obj types.NamespacedName)

func (*FakeTracker) TrackKind

func (f *FakeTracker) TrackKind(kind schema.GroupKind, obj types.NamespacedName)

type Listers

type Listers struct {
	// contains filtered or unexported fields
}

func NewListers

func NewListers(objs []runtime.Object) Listers

func (*Listers) BuildServiceObjects

func (l *Listers) BuildServiceObjects() []runtime.Object

func (*Listers) GetBuildLister

func (l *Listers) GetBuildLister() buildlisters.BuildLister

func (*Listers) GetBuilderLister

func (l *Listers) GetBuilderLister() buildlisters.BuilderLister

func (*Listers) GetBuildpackLister

func (l *Listers) GetBuildpackLister() buildlisters.BuildpackLister

func (*Listers) GetClusterBuilderLister

func (l *Listers) GetClusterBuilderLister() buildlisters.ClusterBuilderLister

func (*Listers) GetClusterBuildpackLister

func (l *Listers) GetClusterBuildpackLister() buildlisters.ClusterBuildpackLister

func (*Listers) GetClusterStackLister

func (l *Listers) GetClusterStackLister() buildlisters.ClusterStackLister

func (*Listers) GetClusterStoreLister

func (l *Listers) GetClusterStoreLister() buildlisters.ClusterStoreLister

func (*Listers) GetConfigMapLister

func (l *Listers) GetConfigMapLister() corev1listers.ConfigMapLister

func (*Listers) GetDuckBuilderLister

func (l *Listers) GetDuckBuilderLister() *duckbuilder.DuckBuilderLister

func (*Listers) GetImageLister

func (l *Listers) GetImageLister() buildlisters.ImageLister

func (*Listers) GetKubeObjects

func (l *Listers) GetKubeObjects() []runtime.Object

func (*Listers) GetPersistentVolumeClaimLister

func (l *Listers) GetPersistentVolumeClaimLister() corev1listers.PersistentVolumeClaimLister

func (*Listers) GetPodLister

func (l *Listers) GetPodLister() corev1listers.PodLister

func (*Listers) GetSourceResolverLister

func (l *Listers) GetSourceResolverLister() buildlisters.SourceResolverLister

type SpecReconcilerTester

type SpecReconcilerTester struct {
	// contains filtered or unexported fields
}

func ReconcilerTester

func ReconcilerTester(t *testing.T, factory rtesting.Factory) SpecReconcilerTester

func (SpecReconcilerTester) Test

func (rt SpecReconcilerTester) Test(test rtesting.TableRow)

Jump to

Keyboard shortcuts

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