Documentation
¶
Overview ¶
Copyright (c) 2019-2021 Red Hat, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (c) 2019-2021 Red Hat, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (c) 2019-2021 Red Hat, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (c) 2019-2021 Red Hat, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
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.SortSlices(func(a, b dw.EnvVar) bool { return strings.Compare(a.Name, b.Name) > 0 }), cmpopts.IgnoreFields(dw.DevWorkspaceEvents{}, "PostStart", "PreStop", "PostStop"), }
Functions ¶
This section is empty.
Types ¶
type FakeHTTPGetter ¶
type FakeHTTPGetter struct {
DevfileResources map[string]dw.Devfile
DevWorkspaceResources map[string]dw.DevWorkspaceTemplate
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
DevWorkspaceResources map[string]dw.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 {
DevWorkspace *dw.DevWorkspaceTemplateSpec `json:"devworkspace,omitempty"`
// DevWorkspaceResources is a map of string keys to devworkspace templates
DevWorkspaceResources map[string]dw.DevWorkspaceTemplate `json:"devworkspaceResources,omitempty"`
// DevfileResources is a map of string keys to devfile resources
DevfileResources map[string]dw.Devfile `json:"devfileResources,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 {
DevWorkspace *dw.DevWorkspaceTemplateSpec `json:"devworkspace,omitempty"`
ErrRegexp *string `json:"errRegexp,omitempty"`
}