Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var WorkspaceTemplateDiffOpts = cmp.Options{ cmpopts.SortSlices(func(a, b dw.Component) bool { return strings.Compare(a.Key(), b.Key()) > 0 }), cmpopts.SortSlices(func(a, b string) bool { return strings.Compare(a, b) > 0 }), cmpopts.IgnoreFields(dw.WorkspaceEvents{}, "PostStart", "PreStop", "PostStop"), }
Functions ¶
func SetupControllerCfg ¶
func SetupControllerCfg()
Types ¶
type FakeHTTPGetter ¶
type FakeHTTPGetter struct {
Plugins map[string]network.Devfile
Errors map[string]TestPluginError
}
type FakeInternalRegistry ¶
type FakeInternalRegistry struct {
Plugins map[string]dw.DevWorkspaceTemplate
Errors map[string]TestPluginError
}
func (*FakeInternalRegistry) IsInInternalRegistry ¶
func (reg *FakeInternalRegistry) IsInInternalRegistry(pluginID string) bool
func (*FakeInternalRegistry) ReadPluginFromInternalRegistry ¶
func (reg *FakeInternalRegistry) ReadPluginFromInternalRegistry(pluginID string) (*dw.DevWorkspaceTemplate, error)
type FakeK8sClient ¶
type FakeK8sClient struct {
client.Client // To satisfy interface; override all used methods
Plugins map[string]v1alpha2.DevWorkspaceTemplate
Errors map[string]TestPluginError
}
type TestCase ¶
type TestCase struct {
Name string `json:"name"`
Input TestInput `json:"input"`
Output TestOutput `json:"output"`
}
type TestInput ¶
type TestInput struct {
Workspace dw.DevWorkspaceTemplateSpec `json:"workspace,omitempty"`
// Plugins is a map of plugin "name" to devworkspace template; namespace is ignored.
Plugins map[string]dw.DevWorkspaceTemplate `json:"plugins,omitempty"`
// DevfilePlugins is a map of plugin "name" to devfile
DevfilePlugins map[string]network.Devfile `json:"devfilePlugins,omitempty"`
// Errors is a map of plugin name to the error that should be returned when attempting to retrieve it.
Errors map[string]TestPluginError `json:"errors,omitempty"`
}
type TestOutput ¶
type TestOutput struct {
Workspace *dw.DevWorkspaceTemplateSpec `json:"workspace,omitempty"`
ErrRegexp *string `json:"errRegexp,omitempty"`
}
type TestPluginError ¶
Click to show internal directories.
Click to hide internal directories.