testutil

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2016 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultTimeFunc

func DefaultTimeFunc(i int) time.Time

DefaultTimeFunc can be passed to GetRawAnnotations for the timeFunc parameter

func DefaultUUIDFunc

func DefaultUUIDFunc(i int) uuid.UUID

DefaultUUIDFunc can be passed to GetRawAnnotations for the uuidFunc parameter

func GetClusters

func GetClusters() []*container.Cluster

GetClusters gets a list of clusters with names and versions defined

func GetRawAnnotations

func GetRawAnnotations(
	leaseableClusters []*container.Cluster,
	timeFmt string,
	timeFunc func(int) time.Time,
	uuidFunc func(int) uuid.UUID,
) map[string]string

GetRawAnnotations constructs a map of raw annotations, each of which represents a lease for one of the clusters in clusterNames

func LeaseJSON

func LeaseJSON(clusterName string, exprTime time.Time, timeFmt string) string

LeaseJSON returns the json representative of what a lease should look like when encoded. It does so without first creating a *leases.Lease, so it should be used in tests to verify the lease wire representation

func TestDataDir

func TestDataDir() string

TestDataDir returns the fully qualified path to the testdata/ directory

Types

This section is empty.

Jump to

Keyboard shortcuts

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