suite

package
v0.0.0-...-3a98d3a Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package suite defines interfaces for abstracting the fields of a Suite or SuiteSet.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CentralizedSuite

type CentralizedSuite interface {
	// Metadata returns the metadata for a Suite or SuiteSet.
	Metadata() *Metadata

	// ID returns the id of the Suite or SuiteSet, if the struct does not
	// hold a Suite or SuiteSet it returns an empty string.
	ID() string

	// Tests returns the tests for a Suite or empty list if the interface contains
	// a SuiteSet.
	Tests() []string

	// Suites returns the child suites for a SuiteSet or empty list if the interface
	// contains a Suite.
	Suites() []string

	// SuiteSets returns the child suitesets for a SuiteSet or empty listif the interface
	// contains a Suite.
	SuiteSets() []string

	// Closures takes in map of all known Suites/SuiteSets and generates closure
	// relationships to be uploaded to database for efficient queries, only generates
	// closures for the CentralizedSuite not for all Suites/SuiteSets in suites arg.
	Closures(suites map[string]CentralizedSuite) ([]*SuiteClosure, error)
}

CentralizedSuite is an interface that allows generic access to the fields of a Suite or SuiteSet.

type Metadata

type Metadata struct {
	BugComponent string
	Owners       []string
	Criteria     string
}

type Suite

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

Suite implements the CentralizedSuite interface for a Suite.

func NewSuite

func NewSuite(suite *api.Suite) *Suite

NewSuite returns constructs a suite object from an api.Suite Protobuf.

func (*Suite) Closures

func (s *Suite) Closures(suites map[string]CentralizedSuite) ([]*SuiteClosure, error)

func (*Suite) ID

func (s *Suite) ID() string

ID returns the id of the Suite, if the struct does not hold a Suite it returns an empty string.

func (*Suite) Metadata

func (s *Suite) Metadata() *Metadata

Metadata returns the metadata for a Suite.

func (*Suite) SuiteSets

func (s *Suite) SuiteSets() []string

SuiteSets returns an empty list since this is not a SuiteSet.

func (*Suite) Suites

func (s *Suite) Suites() []string

Suites returns an empty list since this is not a SuiteSet.

func (*Suite) Tests

func (s *Suite) Tests() []string

Tests returns the tests for the Suite.

type SuiteClosure

type SuiteClosure struct {
	ID    string
	Child string
	Depth int
	Path  string
}

SuiteClosure holds the information for a row in the closure table this is used to publish SuiteSet relationships and allow quick easy lookup.

type SuiteSet

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

SuiteSet implements the CentralizedSuite interface for a SuiteSet.

func NewSuiteSet

func NewSuiteSet(suiteSet *api.SuiteSet) *SuiteSet

NewSuiteSet constructs a new SuiteSet from a Protobuf.

func (*SuiteSet) Closures

func (s *SuiteSet) Closures(suites map[string]CentralizedSuite) ([]*SuiteClosure, error)

Closures takes in map of all known Suites/SuiteSets and generates closure relationships to be uploaded to database for efficient queries, only generates closures for the CentralizedSuite not for all Suites/SuiteSets in suites arg.

func (*SuiteSet) ID

func (s *SuiteSet) ID() string

ID returns the id of the Suite, if the struct does not hold a Suite it returns an empty string.

func (*SuiteSet) Metadata

func (s *SuiteSet) Metadata() *Metadata

Metadata returns the metadata for a Suite.

func (*SuiteSet) SuiteSets

func (s *SuiteSet) SuiteSets() []string

SuiteSets returns the IDs of the child SuiteSet of the SuiteSet.

func (*SuiteSet) Suites

func (s *SuiteSet) Suites() []string

Suites returns the IDs of the child Suites of the SuiteSet.

func (*SuiteSet) Tests

func (s *SuiteSet) Tests() []string

Tests returns an empty list since this is not a Suite.

Jump to

Keyboard shortcuts

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