extension

package
v0.0.0-...-7c419f1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const CurrentExtensionAPIVersion = "v1.0"
View Source
const DefaultExtension = "default"

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component struct {
	// The product this component is part of.
	Product string `json:"product"`
	// The type of the component.
	Kind string `json:"type"`
	// The name of the component.
	Name string `json:"name"`
}

Component represents the component the binary acts on.

func (*Component) Identifier

func (e *Component) Identifier() string

type Extension

type Extension struct {
	APIVersion string    `json:"apiVersion"`
	Source     Source    `json:"source"`
	Component  Component `json:"component"`

	// Suites that the extension wants to advertise/participate in.
	Suites []Suite `json:"suites"`
	// contains filtered or unexported fields
}

Extension represents an extension to openshift-tests.

func NewExtension

func NewExtension(product, kind, name string) *Extension

func (*Extension) AddGlobalSuite

func (e *Extension) AddGlobalSuite(suite Suite) *Extension

AddGlobalSuite adds a suite whose qualifiers will apply to all tests, not just this one. Allowing a developer to create a composed suite of tests from many sources.

func (*Extension) AddSpecs

func (e *Extension) AddSpecs(specs et.ExtensionTestSpecs)

func (*Extension) AddSuite

func (e *Extension) AddSuite(suite Suite) *Extension

AddSuite adds a suite whose qualifiers will only apply to tests present in its own extension.

func (*Extension) FindRemovedTestsWithoutRename

func (e *Extension) FindRemovedTestsWithoutRename(oldSpecs et.ExtensionTestSpecs) ([]string, error)

FindRemovedTestsWithoutRename compares the current set of test specs against oldSpecs, including consideration of the original name, we return an error. Can be used to detect test renames or removals.

func (*Extension) FindSpecsByName

func (e *Extension) FindSpecsByName(names ...string) (et.ExtensionTestSpecs, error)

func (*Extension) GetSpecs

func (e *Extension) GetSpecs() et.ExtensionTestSpecs

func (*Extension) GetSuite

func (e *Extension) GetSuite(name string) (*Suite, error)

func (*Extension) IgnoreObsoleteTests

func (e *Extension) IgnoreObsoleteTests(testNames ...string)

IgnoreObsoleteTests allows removal of a test.

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

func NewRegistry

func NewRegistry() *Registry

func (*Registry) Deregister

func (r *Registry) Deregister(name string)

func (*Registry) Get

func (r *Registry) Get(name string) *Extension

func (*Registry) Register

func (r *Registry) Register(extension *Extension)

func (*Registry) Walk

func (r *Registry) Walk(walkFn func(*Extension))

type Source

type Source struct {
	// Commit from which this binary was compiled.
	Commit string `json:"commit"`
	// BuildDate ISO8601 string of when the binary was built
	BuildDate string `json:"build_date"`
	// GitTreeState lets you know the status of the git tree (clean/dirty)
	GitTreeState string `json:"git_tree_state"`
	// SourceURL contains the url of the git repository (if known) that this extension was built from.
	SourceURL string `json:"source_url,omitempty"`
}

Source contains the details of the commit and source URL.

type Suite

type Suite struct {
	// The name of the suite.
	Name string `json:"name"`
	// Parent suites this suite is part of.
	Parents []string `json:"parents,omitempty"`
	// Qualifiers are CEL expressions that are OR'd together for test selection that are members of the suite.
	Qualifiers []string `json:"qualifiers,omitempty"`
}

Suite represents additional suites the extension wants to advertise.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL