test

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2022 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AContext added in v0.9.0

func AContext() gomock.Matcher

AContext returns a gomock matchers that evaluates if the receive value can fullfills the context.Context interface

func AssertContentToFile

func AssertContentToFile(t *testing.T, gotContent, wantFile string)

func AssertFilesEquals

func AssertFilesEquals(t *testing.T, gotPath, wantPath string)

func Bundles added in v0.6.0

func Bundles(t *testing.T) *releasev1alpha1.Bundles

func EksdRelease added in v0.8.0

func EksdRelease(t *testing.T) *eksdv1alpha1.Release

func FakeNow

func FakeNow() time.Time

func NewClusterSpec

func NewClusterSpec(opts ...ClusterSpecOpt) *cluster.Spec

func NewFullClusterSpec

func NewFullClusterSpec(t *testing.T, clusterConfigFile string) *cluster.Spec

func NewHTTPServerForFile added in v0.9.0

func NewHTTPServerForFile(t *testing.T, filePath string) *httptest.Server

func NewNullLogger added in v0.11.0

func NewNullLogger() logr.Logger

func NewWriter

func NewWriter(t *testing.T) (dir string, writer filewriter.FileWriter)

func OfType

func OfType(t string) gomock.Matcher

func RandString added in v0.7.1

func RandString(n int) string

func ReadFile

func ReadFile(t *testing.T, file string) string

func SanitizePath added in v0.8.0

func SanitizePath(s string) string

SanitizePath sanitizes s so its usable as a path name. For safety, it assumes all characters that are not A-Z, a-z, 0-9, _ or - are illegal and replaces them with _.

func SetTag

func SetTag(image *releasev1alpha1.Image, tag string)

Types

type ClusterSpecOpt

type ClusterSpecOpt func(*cluster.Spec)

type Reader added in v0.9.0

type Reader interface {
	ReadFile(url string) ([]byte, error)
}

Reader is a commonly used interface in multiple packages We are replicating here just to create a single mock we can use in multiple test packages

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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