literal

package
v0.0.0-...-aac4589 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package literal implements a test fetcher that embeds the test step definitions, instead of fetching them.

Index

Constants

This section is empty.

Variables

View Source
var (
	Name = "Literal"
)

Name defined the name of the plugin

Functions

func Load

func Load() (string, test.TestFetcherFactory)

Load returns the name and factory which are needed to register the TestFetcher.

func New

func New() test.TestFetcher

New initializes the TestFetcher object

Types

type FetchParameters

type FetchParameters struct {
	TestName string
	Steps    []*test.TestStepDescriptor
}

FetchParameters contains the parameters necessary to fetch tests. This structure is populated from a JSON blob.

type Literal

type Literal struct {
}

Literal implements contest.TestFetcher interface, returning dummy test fetcher

func (*Literal) Fetch

func (tf *Literal) Fetch(_ xcontext.Context, params interface{}) (string, []*test.TestStepDescriptor, error)

Fetch returns the information necessary to build a Test object. The returned values are: * Name of the test * list of step definitions * an error if any

func (Literal) ValidateFetchParameters

func (tf Literal) ValidateFetchParameters(_ xcontext.Context, params []byte) (interface{}, error)

ValidateFetchParameters performs sanity checks on the fields of the parameters that will be passed to Fetch.

Jump to

Keyboard shortcuts

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