framework

package
v0.100.4 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PackageFromFile = node.PackageFromFile
	NewConstraint   = semver.NewConstraint
)

Monkey patch functions to allow mocking during unit testing

Functions

func GitReleaseSegments added in v0.30.0

func GitReleaseSegments(m *Metadata) (org, repo, tag string, err error)

GitReleaseSegments segments GitRelease into separate parts of org, repo and tag. Returns an error if GitRelease is malformed. The expected GitRelease format is "org/repo:tag".

Types

type ExactStrategy added in v0.90.0

type ExactStrategy struct {
}

ExactStrategy searches for the metadata of a framework by its exact version

func (ExactStrategy) Find added in v0.90.0

func (s ExactStrategy) Find(ctx context.Context, svc MetadataService, frameworkName string, frameworkVersion string) (Metadata, error)

type Framework

type Framework struct {
	Name    string
	Version string
}

Framework represents a test framework (e.g. cypress).

type FrameworkUnavailableError added in v0.90.0

type FrameworkUnavailableError struct {
	Name    string
	Version string
}

FrameworkUnavailableError is an error type returned if the requested framework version is unavailable.

func (*FrameworkUnavailableError) Error added in v0.90.0

func (e *FrameworkUnavailableError) Error() string

Error returns the error string

type Metadata added in v0.30.0

type Metadata struct {
	FrameworkName      string
	FrameworkVersion   string
	Deprecated         bool
	DockerImage        string
	GitRelease         string
	Platforms          []Platform
	CloudRunnerVersion string
}

Metadata represents test runner metadata.

type MetadataSearchStrategy added in v0.90.0

type MetadataSearchStrategy interface {
	Find(ctx context.Context, svc MetadataService, frameworkName string, searchValue string) (Metadata, error)
}

MetadataSearchStrategy is a generic strategy for determining if the requested framework version is supported

func NewSearchStrategy added in v0.90.0

func NewSearchStrategy(version string, rootDir string) MetadataSearchStrategy

NewSearchStrategy returns a concrete MetadataSearchStrategy

type MetadataService added in v0.30.0

type MetadataService interface {
	Search(ctx context.Context, opts SearchOptions) (Metadata, error)

	Frameworks(ctx context.Context) ([]Framework, error)
	Versions(ctx context.Context, frameworkName string) ([]Metadata, error)
}

MetadataService represents an interface for retrieving framework metadata.

type PackageStrategy added in v0.90.0

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

PackageStrategy searches for metadata of a framework from a package.json file. If the requested version is a range (e.g. ~9.0.0), it matches the most recent version that satifies the constraint.

func (PackageStrategy) Find added in v0.90.0

func (s PackageStrategy) Find(ctx context.Context, svc MetadataService, frameworkName string, packageJsonPath string) (Metadata, error)

type Platform added in v0.49.0

type Platform struct {
	PlatformName string
	BrowserNames []string
}

Platform represent a supported platform.

type SearchOptions added in v0.30.0

type SearchOptions struct {
	Name             string
	FrameworkVersion string
}

SearchOptions represents read query options for MetadataService.Search().

Jump to

Keyboard shortcuts

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