ucp

package
v0.34.0-rc1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ContainerLogPathEnvVar = "RADIUS_CONTAINER_LOG_PATH"
)

Variables

This section is empty.

Functions

func NewUCPRequest

func NewUCPRequest(method string, url string, body io.Reader) (*http.Request, error)

NewUCPRequest creates an HTTP request with the given method, URL and body, and adds a Content-Type header to it, returning the request or an error if one occurs.

Types

type RequiredFeature

type RequiredFeature string

RequiredFeature is used to specify an optional feature that is required for the test to run.

const (
	// FeatureAWS should be used with required features to indicate a test dependency on AWS cloud provider.
	FeatureAWS RequiredFeature = "AWS"

	// FeatureAzure should be used with required features to indicate a test dependency on Azure cloud provider.
	FeatureAzure RequiredFeature = "Azure"
)

type TestRunMethod

type TestRunMethod func(t *testing.T, url string, roundtripper http.RoundTripper)

type TestStep

type TestStep struct {
}

type UCPTest

type UCPTest struct {
	Options     test.TestOptions
	Name        string
	Description string
	RunMethod   TestRunMethod

	// RequiredFeatures is a list of features that are required for the test to run.
	RequiredFeatures []RequiredFeature
}

func NewUCPTest

func NewUCPTest(t *testing.T, name string, runMethod TestRunMethod) UCPTest

NewUCPTest creates a new UCPTest instance with the given name and run method.

func (UCPTest) CheckRequiredFeatures

func (ct UCPTest) CheckRequiredFeatures(ctx context.Context, t *testing.T)

CheckRequiredFeatures checks the test environment for the features that the test requires and skips the test if not, otherwise returns an error if there is an issue.

func (UCPTest) Test

func (ucptest UCPTest) Test(t *testing.T)

Directories

Path Synopsis
package storetest contains SHARED tests for /pkg/ucp/queue
package storetest contains SHARED tests for /pkg/ucp/queue
package storetest contains SHARED testing logic that is common to our data-store implementations.
package storetest contains SHARED testing logic that is common to our data-store implementations.

Jump to

Keyboard shortcuts

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