test

package
v0.0.0-...-d3c9bd8 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	SystemNamespace = "dubbo-system"
)

Variables

View Source
var CustomResourceDir = filepath.Join("deploy", "charts", "admin", "crds")

CustomResourceDir is the path from the top of the Dubbo repository to the directory containing the Dubbo CRD YAML files.

View Source
var LabelBuildCheck = ginkgo.Label("build_check")

LabelBuildCheck this is for tests that check that the build is correct (some tests rely on build flags to be set)

Functions

func EntriesForFolder

func EntriesForFolder(folder string) []ginkgo.TableEntry

EntriesForFolder returns all files in the folder as gingko table entries for files *.input.yaml this makes it easier to add test by only adding input and golden files if you prefix the file with a `F` we'll focus this specific test

func FindFreePort

func FindFreePort(ip string) (uint32, error)

func GetFreePort

func GetFreePort() (int, error)

func ParseDuration

func ParseDuration(duration string) *k8s.Duration

func RunE2ESpecs

func RunE2ESpecs(t *testing.T, description string)

func RunSpecs

func RunSpecs(t *testing.T, description string)

RunSpecs wraps ginkgo+gomega test suite initialization.

func Setup

func Setup(rt core_runtime.Runtime) error

func Within

func Within(timeout time.Duration, task func()) func()

Within returns a function that executes the given test task in a dedicated goroutine, asserting that it must complete within the given timeout.

See https://github.com/onsi/ginkgo/blob/v2/docs/MIGRATING_TO_V2.md#removed-async-testing

Types

type Clock

type Clock struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewClock

func NewClock(t time.Time) *Clock

func (*Clock) Add

func (c *Clock) Add(duration time.Duration)

func (*Clock) Now

func (c *Clock) Now() time.Time

type TestServer

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

func NewTestServer

func NewTestServer(rt core_runtime.Runtime) *TestServer

func (*TestServer) NeedLeaderElection

func (a *TestServer) NeedLeaderElection() bool

func (*TestServer) Start

func (t *TestServer) Start(stop <-chan struct{}) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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