tests

package
v2.937.11 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: AGPL-3.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExtTestGroup          = "x-speakeasy-test-group"
	ExtTestServer         = "x-speakeasy-test-server"
	ExtTestTargets        = "x-speakeasy-test-targets"
	ExtTestTargetsExclude = "x-speakeasy-test-targets-exclude"
	ExtTestSecurity       = "x-speakeasy-test-security"
	ExtInternalID         = "x-speakeasy-test-internal-id"
	ExtInternalEnv        = "x-speakeasy-test-internal-env-vars"
	ExtInternalTestGroups = "x-speakeasy-test-internal-test-groups"
)

Variables

This section is empty.

Functions

func GenerateExampleFileIfNeeded

func GenerateExampleFileIfNeeded(dir string) bool

func GetOperationsByID

func GetOperationsByID(a *ast.AST, opts *GetOperationsByIDOptions) map[string][]*ast.Operation

func GetTestFilesDir

func GetTestFilesDir(dir string) string

func IsOperationSupported

func IsOperationSupported(op *ast.Operation, cfg *configuration.Config) bool

func NewInternalEnvVarsExtension

func NewInternalEnvVarsExtension(envVars []ast.TestEnvVar) *extensions.Element

func NewInternalIDExtension

func NewInternalIDExtension(id string) *extensions.Element

func NewInternalTestGroupsExtension

func NewInternalTestGroupsExtension(groups []string) *extensions.Element

func NewTestGroupExtension

func NewTestGroupExtension(group string) *extensions.Element

func NewTestSecurityExtension

func NewTestSecurityExtension(security *TestSecurity) *extensions.Element

func NewTestServerExtension

func NewTestServerExtension(server *TestServer) *extensions.Element

func NewTestTargetsExtension

func NewTestTargetsExtension(targets []string) *extensions.Element

func PopulateTests

func PopulateTests(ctx context.Context, opts PopulateTestsOptions) []*ast.TestGroup

Types

type ArazzoDocumentInfo

type ArazzoDocumentInfo struct {
	Location string
	Doc      *arazzo.Arazzo
}

type GetOperationsByIDOptions

type GetOperationsByIDOptions struct {
	IncludeWebhooks bool
}

type PopulateTestsOptions

type PopulateTestsOptions struct {
	AST                   *ast.AST
	DocInfo               *ArazzoDocumentInfo
	Subsystem             *subsystem.Subsystem
	Target                types.Target
	InternalTestGroupName string
	OutDir                string
}

type TestSecurity

type TestSecurity struct {
	marshaller.Model[TestSecurityCore]

	Value yaml.Node `yaml:"value"`
}

type TestSecurityCore

type TestSecurityCore struct {
	marshaller.CoreModel `model:"testSecurity"`

	Value marshaller.Node[yaml.Node] `key:"value"`
}

type TestServer

type TestServer struct {
	marshaller.Model[TestServerCore]

	BaseURL string `yaml:"baseUrl"`
}

type TestServerCore

type TestServerCore struct {
	marshaller.CoreModel `model:"testServer"`

	BaseURL marshaller.Node[string] `key:"baseUrl"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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