Documentation ¶
Index ¶
- func CleanupEnv(confFiles []*os.File, t *testing.T)
- func FakeDeploymentConfigs() *v1.DeploymentConfigList
- func FakeImageStreams(imageName string, namespace string, tags []string) *imagev1.ImageStreamList
- func FakeKubeClientConfig() string
- func FakeOdoConfig(confPath string, needNamePrefix bool, namePrefix string) config.ConfigInfo
- func FakeOnlyOneExistingProjects() *v1.ProjectList
- func FakeProjectStatus(prjStatus corev1.NamespacePhase, prjName string) *projectv1.Project
- func FakeProjects() *v1.ProjectList
- func FakeRemoveProject(project string, projects *v1.ProjectList) *v1.ProjectList
- func SetUp(odoConfigDetails ConfigDetails, kubeConfigDetails ConfigDetails) (*os.File, *os.File, error)
- func SimulateFileModifications(basePath string, fileModification FileProperties) (string, error)
- func TempMkFile(dir string, fileName string) (string, error)
- func TempMkdir(parentDir string, newDirPrefix string) (string, error)
- type ConfigDetails
- type FileProperties
- type FileType
- type ModificationType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanupEnv ¶ added in v0.0.14
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, needNamePrefix bool, namePrefix 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
func SimulateFileModifications ¶ added in v0.0.15
func SimulateFileModifications(basePath string, fileModification FileProperties) (string, error)
SimulateFileModifications mock function to simulate requested file/folder operation Parameters:
basePath: The parent directory for file/folder involved in desired file operation fileModification: Meta-data of file/folder
Returns:
path to file/folder involved in the operation error if any or nil
func TempMkFile ¶ added in v0.0.15
TempMkFile creates a temporary file.
Types ¶
type ConfigDetails ¶ added in v0.0.14
ConfigDetails struct holds configuration details(odo and/or kube config)
type FileProperties ¶ added in v0.0.15
type FileProperties struct { FilePath string FileParent string FileType FileType ModificationType ModificationType }
FileProperties to contain meta-data of a file like, file/folder name, file/folder parent dir, file type and desired file modification type
type ModificationType ¶ added in v0.0.15
type ModificationType string
ModificationType custom type to indicate file modification type
const ( // UPDATE enum representing update operation on a file UPDATE ModificationType = "update" // CREATE enum representing create operation for a file/folder CREATE ModificationType = "create" // DELETE enum representing delete operation for a file/folder DELETE ModificationType = "delete" // APPEND enum representing append operation on a file APPEND ModificationType = "append" )