testdefinition

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

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultActiveDeadlineSeconds = intstr.FromInt(600)
)

Functions

func GetStdInputArtifacts

func GetStdInputArtifacts() []argov1.Artifact

GetStdInputArtifacts returns the default input artifacts of testdefionitions. The artifacts include kubeconfigs and shared folder inputs

func GetStdOutputArtifacts

func GetStdOutputArtifacts(global bool) []argov1.Artifact

GetStdOutputArtifacts returns the default output artifacts of a step. These artifacts include kubeconfigs and the shared folder.

func GetUntrustedInputArtifacts

func GetUntrustedInputArtifacts() []argov1.Artifact

GetUntrustedInputArtifacts returns the untrusted input artifacts of testdefionitions. The artifacts only include minimal configuration

Types

type ArtifactSet

type ArtifactSet map[string]empty

func (ArtifactSet) Add

func (s ArtifactSet) Add(key string)

func (ArtifactSet) Copy

func (s ArtifactSet) Copy() ArtifactSet

func (ArtifactSet) Has

func (s ArtifactSet) Has(key string) bool

type GitInfo

type GitInfo struct {
	SHA string
	Ref string
}

GitInfo describes additional information about the used sources.

type Location

type Location interface {
	// SetTestDefs adds Testdefinitions to the map.
	SetTestDefs(map[string]*TestDefinition) error
	// Type returns the tmv1beta1.LocationType type.
	Type() tmv1beta1.LocationType
	// Name returns the unique name of the location.
	Name() string
	// GetLocation returns the original TestLocation object
	GetLocation() *tmv1beta1.TestLocation
	// GitInfo returns the current git information
	GitInfo() GitInfo
}

Location is an interface for different testDefLocation types like git or local

type TestDefinition

type TestDefinition struct {
	Info     *tmv1beta1.TestDefinition
	Location Location
	FileName string
	Template *argov1.Template

	Volumes []apiv1.Volume
	// contains filtered or unexported fields
}

TestDefinition represents a TestDefinition which was fetched from locations.

func New

func New(def *tmv1beta1.TestDefinition, loc Location, fileName string) (*TestDefinition, error)

New takes a CRD TestDefinition and its locations, and creates a TestDefinition object.

func NewEmpty

func NewEmpty() *TestDefinition

func (*TestDefinition) AddAnnotation

func (td *TestDefinition) AddAnnotation(key, value string)

GetAnnotations returns Template annotations for a testdefinition

func (*TestDefinition) AddConfig

func (td *TestDefinition) AddConfig(configs []*config.Element)

AddConfig adds the config elements of different types (environment variable) to the TestDefinitions's template.

func (*TestDefinition) AddEnvVars

func (td *TestDefinition) AddEnvVars(envs ...apiv1.EnvVar)

AddEnvVars adds environment variables to the container of the TestDefinition's template.

func (*TestDefinition) AddInputArtifacts

func (td *TestDefinition) AddInputArtifacts(artifacts ...argov1alpha1.Artifact)

AddInputArtifacts adds argo artifacts to the input of the TestDefinitions's template.

func (*TestDefinition) AddInputParameter

func (td *TestDefinition) AddInputParameter(name, value string)

AddInputParameter adds a parameter to the input of the TestDefinitions's template.

func (*TestDefinition) AddOutputArtifacts

func (td *TestDefinition) AddOutputArtifacts(artifacts ...argov1alpha1.Artifact)

AddOutputArtifacts adds argo artifacts to the output of the TestDefinitions's template.

func (*TestDefinition) AddStdOutput

func (td *TestDefinition) AddStdOutput(global bool)

AddStdOutput adds the Kubeconfig output to the TestDefinitions's template.

func (*TestDefinition) AddVolume

func (td *TestDefinition) AddVolume(volume apiv1.Volume)

AddVolume adds a volume to a TestDefinitions's template.

func (*TestDefinition) AddVolumeFromConfig

func (td *TestDefinition) AddVolumeFromConfig(cfg *config.Element) error

func (*TestDefinition) AddVolumeMount

func (td *TestDefinition) AddVolumeMount(name, path, subpath string, readOnly bool)

AddVolumeMount adds a mount to the container of the TestDefinitions's template.

func (*TestDefinition) Copy

func (td *TestDefinition) Copy() *TestDefinition

New returns a deep copy of the TestDefinition.

func (*TestDefinition) GetConfig

func (td *TestDefinition) GetConfig() config.Set

func (*TestDefinition) GetName

func (td *TestDefinition) GetName() string

func (*TestDefinition) GetTemplate

func (td *TestDefinition) GetTemplate() (*argov1alpha1.Template, error)

func (*TestDefinition) HasBehavior

func (td *TestDefinition) HasBehavior(behavior string) bool

HasBehavior checks if the testrun has defined a specific behavior like serial or disruptiv.

func (*TestDefinition) HasLabel

func (td *TestDefinition) HasLabel(label string) bool

HasLabel checks if the TestDefinition has a specific label. (Group in testdef)

func (*TestDefinition) SetName

func (td *TestDefinition) SetName(name string)

func (*TestDefinition) SetSuspend

func (td *TestDefinition) SetSuspend()

Jump to

Keyboard shortcuts

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