testingutil

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupEnv added in v0.0.14

func CleanupEnv(confFiles []*os.File, t *testing.T)

CleanupEnv cleans up the mock config file and anything that SetupEnv generated Parameters:

configFile: the mock config file handler
t: testing pointer to log errors if any

func FakeDeploymentConfigs added in v0.0.10

func FakeDeploymentConfigs() *v1.DeploymentConfigList

func FakeImageStreams

func FakeImageStreams(imageName string, namespace string, tags []string) *imagev1.ImageStreamList

FakeImageStreams lists the imagestreams for the reactor

func FakeKubeClientConfig added in v0.0.14

func FakeKubeClientConfig() string

FakeKubeClientConfig returns mock kube client config

func FakeOdoConfig added in v0.0.14

func FakeOdoConfig(confPath string) config.ConfigInfo

FakeOdoConfig returns mock odo config It takes a confPath which is the path to the config

func FakeOnlyOneExistingProjects added in v0.0.14

func FakeOnlyOneExistingProjects() *v1.ProjectList

FakeOnlyOneExistingProjects returns fake projectlist with single project for use by API mock functions for Unit tests testing delete of the only available project

func FakeProjectStatus added in v0.0.14

func FakeProjectStatus(prjStatus corev1.NamespacePhase, prjName string) *projectv1.Project

FakeProjectStatus returns fake project status for use by mock watch on project

func FakeProjects added in v0.0.11

func FakeProjects() *v1.ProjectList

FakeProjects returns fake projectlist for use by API mock functions for Unit tests

func FakeRemoveProject added in v0.0.14

func FakeRemoveProject(project string, projects *v1.ProjectList) *v1.ProjectList

FakeRemoveProject removes the delete requested project from the list of projects passed

func SetUp added in v0.0.14

func SetUp(odoConfigDetails ConfigDetails, kubeConfigDetails ConfigDetails) (*os.File, *os.File, error)

SetUp sets up the odo and kube config files and returns respective conf file pointers and error

Types

type ConfigDetails added in v0.0.14

type ConfigDetails struct {
	FileName      string
	Config        interface{}
	ConfigPathEnv string
}

ConfigDetails struct holds configuration details(odo and/or kube config)

Jump to

Keyboard shortcuts

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