spechelper

package
v0.0.0-...-4e1183a Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2021 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LetVarExampleReleaseManualPilotEnrollment = `ExampleReleaseManualPilotEnrollment`

	LetVarExampleReleaseRollout  = `example release rollout`
	LetVarExampleReleaseFlag     = `example release flag`
	LetVarExamplePilotExternalID = `PilotExternalID`
	LetVarExamplePilot           = `ManualPilot`
	LetVarExamplePilotEnrollment = `PilotEnrollment`
)
View Source
const (
	LetVarExampleToken = `example token`
	LetVarTokenText    = `example token as text`
	LetVarUniqueUserID = `UniqUserID`
)
View Source
const LetVarExampleDeploymentEnvironment = `example deployment environment`
View Source
const LetVarExampleUseCases = `LetVarExampleUseCases`
View Source
const (
	// TagBlackBox means that the test currently using mechanism that makes the system act like black box.
	// Such case is when the system is used E2E through an external interface such as HTTP over TCP.
	//
	// When black box tag is provided it is expected that components in the tests should behave as real as possible.
	// For example there shouldn't be transaction bounded with the context, or similar things.
	TagBlackBox = `black-box`
)

Variables

View Source
var (
	Context = testcase.Var{
		Name: `common testing context`,
		Init: func(t *testcase.T) interface{} {
			return context.Background()
		},
	}
	ExampleID = testcase.Var{
		Name: `example unique ID`,
		Init: func(t *testcase.T) interface{} {
			return fixtures.Random.String()
		},
	}
)
View Source
var FixtureFactory = testcase.Var{Name: "contracts.FixtureFactory"}
View Source
var Storage = testcase.Var{
	Name:  `toggler.Storage`,
	Init:  storageInit,
	OnLet: storageOnLet,
}

Functions

func AndExamplePilotManualParticipatingIsSetTo

func AndExamplePilotManualParticipatingIsSetTo(s *testcase.Spec, isParticipating bool)

func AndReleaseFlagRolloutPercentageIs

func AndReleaseFlagRolloutPercentageIs(s *testcase.Spec, rolloutLVN string, percentage int)

func ContextGet

func ContextGet(t *testcase.T) context.Context

func CreateToken

func CreateToken(t *testcase.T, tokenOwner string) (string, *security.Token)

func ExampleDeploymentEnvironment

func ExampleDeploymentEnvironment(t *testcase.T) *release.Environment

func ExampleExternalPilotID

func ExampleExternalPilotID(t *testcase.T) string

func ExampleIDGet

func ExampleIDGet(t *testcase.T) string

func ExampleReleaseFlag

func ExampleReleaseFlag(t *testcase.T) *release.Flag

func ExampleReleaseManualPilotEnrollment

func ExampleReleaseManualPilotEnrollment(t *testcase.T) *release.Pilot

func ExampleReleaseRollout

func ExampleReleaseRollout(t *testcase.T) *release.Rollout

func ExampleRolloutManager

func ExampleRolloutManager(t *testcase.T) *release.RolloutManager

func ExampleTextToken

func ExampleTextToken(t *testcase.T) string

func ExampleToken

func ExampleToken(t *testcase.T) *security.Token

func ExampleUniqueUserID

func ExampleUniqueUserID(t *testcase.T) string

func ExampleUseCases

func ExampleUseCases(t *testcase.T) *toggler.UseCases

func FindStoredReleaseFlagByName

func FindStoredReleaseFlagByName(t *testcase.T, name string) *release.Flag

func FixtureFactoryGet

func FixtureFactoryGet(t *testcase.T) frameless.FixtureFactory

func FixtureFactoryLet

func FixtureFactoryLet(s *testcase.Spec, blk func(testing.TB) frameless.FixtureFactory)

func GetDeploymentEnvironment

func GetDeploymentEnvironment(t *testcase.T, vn string) *release.Environment

func GetReleaseFlag

func GetReleaseFlag(t *testcase.T, lvn string) *release.Flag

func GetReleaseRollout

func GetReleaseRollout(t *testcase.T, vn string) *release.Rollout

func GetReleaseRolloutPlan

func GetReleaseRolloutPlan(t *testcase.T, rolloutLVN string) release.RolloutPlan

func GetUseCases

func GetUseCases(t *testcase.T, varName string) *toggler.UseCases

func GivenHTTPRequestHasAppToken

func GivenHTTPRequestHasAppToken(s *testcase.Spec)

func GivenWeHaveDeploymentEnvironment

func GivenWeHaveDeploymentEnvironment(s *testcase.Spec, vn string) testcase.Var

func GivenWeHaveReleaseFlag

func GivenWeHaveReleaseFlag(s *testcase.Spec, vn string)

func GivenWeHaveReleasePilot

func GivenWeHaveReleasePilot(s *testcase.Spec, vn string) testcase.Var

func GivenWeHaveReleaseRollout

func GivenWeHaveReleaseRollout(s *testcase.Spec, vn, flagLVN, envLVN string)

func NewFixtureFactory

func NewFixtureFactory(tb testing.TB) frameless.FixtureFactory

func NewSpec

func NewSpec(tb testing.TB) *testcase.Spec

func NoDeploymentEnvironmentPresentInTheStorage

func NoDeploymentEnvironmentPresentInTheStorage(s *testcase.Spec)

func NoReleaseFlagPresentInTheStorage

func NoReleaseFlagPresentInTheStorage(s *testcase.Spec)

func NoReleasePilotPresentInTheStorage

func NoReleasePilotPresentInTheStorage(s *testcase.Spec)

func NoReleaseRolloutPresentInTheStorage

func NoReleaseRolloutPresentInTheStorage(s *testcase.Spec)

func ReleasePilotGet

func ReleasePilotGet(t *testcase.T, v testcase.Var) *release.Pilot

func SetUp

func SetUp(s *testcase.Spec)

func SpecPilotEnrolmentIs

func SpecPilotEnrolmentIs(t *testcase.T, enrollment bool)

func StorageGet

func StorageGet(t *testcase.T) toggler.Storage

Types

This section is empty.

Jump to

Keyboard shortcuts

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