Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Disposable ¶
Disposable is an interface representing the disposable test resources
type KubeTestPlatform ¶
type KubeTestPlatform struct {
AppResources *TestResources
ComponentResources *TestResources
// contains filtered or unexported fields
}
KubeTestPlatform includes K8s client for testing cluster and kubernetes testing apps
func NewKubeTestPlatform ¶
func NewKubeTestPlatform() *KubeTestPlatform
NewKubeTestPlatform creates KubeTestPlatform instance
func (*KubeTestPlatform) AcquireAppExternalURL ¶
func (c *KubeTestPlatform) AcquireAppExternalURL(name string) string
AcquireAppExternalURL returns the external url for 'name'
func (*KubeTestPlatform) Restart ¶ added in v0.3.0
func (c *KubeTestPlatform) Restart(name string) error
Restart restarts all instances for the app
type PlatformInterface ¶
type PlatformInterface interface {
AcquireAppExternalURL(name string) string
Restart(name string) error
Scale(name string, replicas int32) error
// contains filtered or unexported methods
}
PlatformInterface defines the testing platform for test runner
type TestResources ¶
type TestResources struct {
// contains filtered or unexported fields
}
TestResources holds initial resources and active resources
func (*TestResources) Add ¶
func (r *TestResources) Add(dr Disposable)
Add adds Disposable resource to resources queue
func (*TestResources) FindActiveResource ¶
func (r *TestResources) FindActiveResource(name string) Disposable
FindActiveResource finds active resource by resource name
type TestRunner ¶
type TestRunner struct {
// Platform is the testing platform instances
Platform PlatformInterface
// contains filtered or unexported fields
}
TestRunner holds initial test apps and testing platform instance maintains apps and platform for e2e test
func NewTestRunner ¶
func NewTestRunner(id string, apps []kube.AppDescription, comps []kube.ComponentDescription) *TestRunner
NewTestRunner returns TestRunner instance for e2e test
func (*TestRunner) Start ¶
func (tr *TestRunner) Start(m runnable) int
Start is the entry point of Dapr test runner