test

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2019 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActionInvocation

func ActionInvocation(wskclient *whisk.Client, actionName string, payload interface{}) (map[string]interface{}, error)

ActionInvocation invokes the given action, dropping the response for gomega compatibility

func ConfigureOwprops

func ConfigureOwprops(name string, secrets corev1.SecretInterface)

ConfigureOwprops sets seed-defaults-owprops

func ConfigurePrivateGithubSecret

func ConfigurePrivateGithubSecret(secrets corev1.SecretInterface)

ConfigurePrivateGithubSecret sets raw.github.ibm.com secret

func ConfigureSeedDefaults

func ConfigureSeedDefaults(configmaps corev1.ConfigMapInterface)

ConfigureSeedDefaults sets seed-defaults

func ConfigureSeedSecret

func ConfigureSeedSecret(secrets corev1.SecretInterface)

ConfigureSeedSecret sets seed-secret and seed-secret-tokens

func CreateNamespaceOrDie

func CreateNamespaceOrDie(namespaces corev1.NamespaceInterface, stem string) string

CreateNamespaceOrDie creates a new unique namespace from stem

func DeleteNamespace

func DeleteNamespace(namespaces corev1.NamespaceInterface, namespace string)

DeleteNamespace deletes a kube namespace. Wait for all resources to be really gone.

func EnsureNamespaceOrDie

func EnsureNamespaceOrDie(namespaces corev1.NamespaceInterface, namespace string)

EnsureNamespaceOrDie makes sure the given namespace exists.

func GetAction

func GetAction(client *whisk.Client, actionName string) func() (*whisk.Action, error)

GetAction tries to get the action.

func GetActivation

func GetActivation(client *whisk.Client, actionName string) func() (*whisk.Activation, error)

GetActivation tries to get activations for the action.

func GetClientsetOrDie

func GetClientsetOrDie(restCfg *rest.Config) *kubernetes.Clientset

GetClientsetOrDie gets a Kube clientset for KUBECONFIG

func GetContextNamespaceOrDie

func GetContextNamespaceOrDie() string

GetContextNamespaceOrDie returns the current namespace context or "default"

func GetObject

func GetObject(context context.Context, obj runtime.Object) func() runtime.Object

GetObject gets the object from the store

func GetPackage added in v0.7.1

func GetPackage(client *whisk.Client, pkgName string) func() (*whisk.Package, error)

GetPackage tries to get the package.

func GetState

func GetState(context context.Context, obj runtime.Object) func() string

GetState gets the object status from the store

func InvokeAction

func InvokeAction(wskclient *whisk.Client, actionName string, payload interface{}) (string, error)

InvokeAction invokes the given action

func LoadFunction

func LoadFunction(filename string) owv1.Function

LoadFunction loads the YAML spec into obj

func LoadInvocation

func LoadInvocation(filename string) owv1.Invocation

LoadInvocation loads the YAML spec into obj

func LoadObject

func LoadObject(filename string, obj runtime.Object) runtime.Object

LoadObject loads the YAML spec into obj

func LoadPackage

func LoadPackage(filename string) owv1.Package

LoadPackage loads the YAML spec into obj

func LoadRule

func LoadRule(filename string) owv1.Rule

LoadRule loads the YAML spec into obj

func LoadTrigger

func LoadTrigger(filename string) owv1.Trigger

LoadTrigger loads the YAML spec into obj

func PostFunction

func PostFunction(context rcontext.Context, name string, spec owv1.FunctionSpec, async bool) runtime.Object

PostFunction creates a Function object

func PostInNs

func PostInNs(context rcontext.Context, obj runtime.Object, async bool, delay time.Duration) runtime.Object

PostInNs the object

func PostInvocation

func PostInvocation(context rcontext.Context, name string, spec owv1.InvocationSpec, async bool) runtime.Object

PostInvocation creates a Function object

func PostPackage

func PostPackage(context rcontext.Context, name string, spec owv1.PackageSpec, async bool) runtime.Object

PostPackage creates a Package object

func Result

func Result(httpResponse map[string]interface{}) map[string]interface{}

Result extracts response.result

func SetupKubeOrDie

func SetupKubeOrDie(restCfg *rest.Config, stem string) string

SetupKubeOrDie setups Kube for testing

func StartTestManager

func StartTestManager(mgr manager.Manager) chan struct{}

StartTestManager starts the manager

Types

This section is empty.

Jump to

Keyboard shortcuts

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