Documentation ¶
Overview ¶
Package testing contains methods to create test data. It's a seaparate package to avoid import cycles. Helper functions can be found in the package `testhelper`.
Index ¶
- func KubeApply(b []byte) error
- func KubeApplyNamespace(b []byte, n string) error
- func KubeClean() error
- func Kubectl(envs []string, args ...string) (string, error)
- func NewContext() context.Context
- type Catalog
- func (c *Catalog) EiriniAppYaml() []byte
- func (c *Catalog) EiriniStagingAppYaml() []byte
- func (c *Catalog) IntegrationManager() eirinix.Manager
- func (c *Catalog) IntegrationManagerFiltered(b bool, n string) eirinix.Manager
- func (c *Catalog) IntegrationManagerNoRegister() eirinix.Manager
- func (c *Catalog) RegisterEiriniXService() error
- func (c *Catalog) ServiceYaml() []byte
- func (c *Catalog) SimpleExtension() eirinix.Extension
- func (c *Catalog) SimpleManager() eirinix.Manager
- func (c *Catalog) SimpleManagerService() eirinix.Manager
- func (c *Catalog) SimpleReconciler() eirinix.Reconciler
- func (c *Catalog) SimpleWatcher() eirinix.Watcher
- func (c *Catalog) SimpleWatcherWithChannel(channel chan watch.Event) eirinix.Watcher
- func (c *Catalog) StartEiriniApp() (*EiriniApp, error)
- func (c *Catalog) StartEiriniAppInNamespace(n string) (*EiriniApp, error)
- func (c *Catalog) StartEiriniStagingApp() (*EiriniApp, error)
- func (c *Catalog) StartEiriniStagingAppInNamespace(n string) (*EiriniApp, error)
- type Container
- type ContainerEnv
- type EditEnvExtension
- type EditImageReconciler
- type EiriniApp
- type ObjectMeta
- type Pod
- type PodSpec
- type PodStatus
- type SimpleWatch
- type SimpleWatcherWithChannel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func KubeApplyNamespace ¶
func NewContext ¶
NewContext returns a non-nil empty context, for usage when it is unclear which context to use. Mostly used in tests.
Types ¶
type Catalog ¶
Catalog provides several instances for test, based on the cf-operator's catalog
func (*Catalog) EiriniAppYaml ¶
EiriniAppYaml returns a fake Eirini app yaml
func (*Catalog) EiriniStagingAppYaml ¶
EiriniStagingAppYaml returns a fake Eirini staging app yaml
func (*Catalog) IntegrationManager ¶
IntegrationManager returns an Extensions manager which is used by integration tests
func (*Catalog) IntegrationManagerFiltered ¶
IntegrationManagerFiltered returns an Extensions manager which is used by integration tests which filters or not eirini apps
func (*Catalog) IntegrationManagerNoRegister ¶
IntegrationManagerNoRegister returns an Extensions manager which is used by integration tests, which doesn't register extensions again
func (*Catalog) RegisterEiriniXService ¶
RegisterEiriniXService register the service generated in ServiceYaml()
func (*Catalog) ServiceYaml ¶
ServiceYaml returns the yaml of the endpoint + service used to reach eiriniX returned in IntegrationManager
func (*Catalog) SimpleExtension ¶
SimpleExtension it's returning a fake dummy Eirini extension
func (*Catalog) SimpleManager ¶
SimpleManager returns a dummy Extensions manager
func (*Catalog) SimpleManagerService ¶
SimpleManagerService returns a dummy Extensions manager configured to run as a service
func (*Catalog) SimpleReconciler ¶
func (c *Catalog) SimpleReconciler() eirinix.Reconciler
SimpleReconciler it's returning a dummy Eirini reconciler extension which adds the annotation "touched": "yes" to all created pods.
func (*Catalog) SimpleWatcher ¶
SimpleWatcher returns a dummy watcher
func (*Catalog) SimpleWatcherWithChannel ¶
SimpleWatcher returns a dummy watcher
func (*Catalog) StartEiriniApp ¶
StartEiriniApp starts EiriniAppYaml with kubernetes
func (*Catalog) StartEiriniAppInNamespace ¶
StartEiriniApp starts EiriniAppYaml with kubernetes
func (*Catalog) StartEiriniStagingApp ¶
StartEiriniApp starts EiriniAppYaml with kubernetes
type Container ¶
type Container struct { Name string `json:"name"` Image string `json:"image"` Envs []ContainerEnv `json:"env"` }
type ContainerEnv ¶
type EditEnvExtension ¶
type EditEnvExtension struct{}
type EditImageReconciler ¶
type EditImageReconciler struct {
// contains filtered or unexported fields
}
type ObjectMeta ¶
type Pod ¶
type Pod struct { Metadata ObjectMeta `json:"metadata"` Spec PodSpec `json:"spec"` PodStatus PodStatus `json:"status"` }