Documentation
¶
Index ¶
- func ExtractNamespaceFromTestName(in string) string
- type Component
- func (c *Component) FindMatch(test *v1.TestInfo) *ComponentMatcher
- func (c *Component) IdentifyVariants() ([]string, error)
- func (c *Component) IsInNamespace(testNamespace string) bool
- func (c *Component) IsNamespaceTest(testName string) (string, bool)
- func (c *Component) IsOperatorTest(test *v1.TestInfo) (bool, []string)
- func (c *Component) JiraProject() string
- func (c *Component) ListNamespaces() []string
- type ComponentMatcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Component ¶
type Component struct { Name string DefaultJiraProject string DefaultJiraComponent string Matchers []ComponentMatcher Operators []string Namespaces []string // Variants defines the list of variants a component is responsible for. The format of // each item is variantCategory:variantValue Variants []string // When a test is renamed, you can still look at results across releases by mapping new names // to the oldest version of the test. TestRenames map[string]string }
Component is the default configuration struct that you can include in your own component implementation. It includes a matcher help that will identify if a test belongs to a sig, operator, as well as simple substring matching. Components do not need to use this framework, it's an optional add-on.
func (*Component) IdentifyVariants ¶
func (*Component) IsInNamespace ¶
func (*Component) IsNamespaceTest ¶
func (*Component) IsOperatorTest ¶
func (*Component) JiraProject ¶
func (*Component) ListNamespaces ¶
type ComponentMatcher ¶
type ComponentMatcher struct { SIG string Suite string IncludeAll []string IncludeAny []string ExcludeAll []string ExcludeAny []string JiraComponent string Capabilities []string Priority int }
ComponentMatcher is used to match against a TestInfo struct. Note the fields SIG, Suite, IncludeAll, and ExcludeAll are ANDed together. That is, all that have values must match. For include and exclude, the individual items in the array are ANDed. That is, if you specify multiple substrings, all must match. Use separate component matchers for an OR operation.
The second set of fields are metadata used to assign ownership.
func (*ComponentMatcher) IsSubstringAllTest ¶
func (cm *ComponentMatcher) IsSubstringAllTest(allOf []string, test *v1.TestInfo) bool
func (*ComponentMatcher) IsSubstringAnyTest ¶
func (cm *ComponentMatcher) IsSubstringAnyTest(anyOf []string, test *v1.TestInfo) bool
func (*ComponentMatcher) IsSuiteTest ¶
func (cm *ComponentMatcher) IsSuiteTest(test *v1.TestInfo) bool