Help us shape the future of Go! Take the 2026 Go Developer Survey

steps

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const EnvAcceptErrorChanges = "IT_ACCEPT_ERROR_CHANGES"

EnvAcceptErrorChanges records a response that differs from its expected error response as an accepted change, beside it as <id>.accepted.json, instead of failing.

It is how an intended difference is recorded: the accepted file is reviewed like any other change, and a response matching either file passes. A response matching neither still fails.

View Source
const EnvRecordExpectedErrors = "IT_RECORD_EXPECTED_ERRORS"

EnvRecordExpectedErrors records expected error responses instead of comparing against them.

They are recorded from the policies as they were before a change, so the changed policies can be proven to leave every error response unchanged. One file serves every Gateway version; a version whose response genuinely differs gets its own file under a directory named for it.

Variables

This section is empty.

Functions

func BasicAuthHeader

func BasicAuthHeader(user, pass string) string

BasicAuthHeader builds a basic-authentication header value.

Types

type Base

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

Base holds shared state and request steps for one integration-test block.

func (*Base) FeatureRoot

func (b *Base) FeatureRoot() string

FeatureRoot returns the root directory containing suite feature assets.

func (*Base) GatewayURL

func (b *Base) GatewayURL(path string) (string, error)

GatewayURL resolves a path against the configured gateway.

func (*Base) GatewayURLAt

func (b *Base) GatewayURLAt(ordinalWord, path string) (string, error)

GatewayURLAt resolves a path against a gateway selected by ordinal.

func (*Base) InvokeWith

func (b *Base) InvokeWith(ctx context.Context, method, path string, headers map[string]string, body []byte) error

InvokeWith sends a request through the suite HTTP funnel.

func (*Base) RequestHost

func (b *Base) RequestHost(ctx context.Context) string

RequestHost returns the host override accumulated by the current scenario.

func (*Base) ResetRequest

func (b *Base) ResetRequest(ctx context.Context) error

ResetRequest clears the current scenario request state.

func (*Base) ScenarioHeaders

func (b *Base) ScenarioHeaders(ctx context.Context) map[string]string

ScenarioHeaders returns the headers accumulated by the current scenario.

func (*Base) SendUntilHeader

func (b *Base) SendUntilHeader(ctx context.Context, method, path, name, want string) error

SendUntilHeader retries a request until a response header has the expected value.

type Suite

type Suite struct {
	*Base
}

Suite is the integration suite's step-binding entry point.

func New

func New(topo *frameworkruntime.Topology, featureRoot ...string) (*Suite, error)

New creates isolated step bindings for one runner in a resolved block.

func (*Suite) Register

func (s *Suite) Register(sc *godog.ScenarioContext)

Register binds shared and product-specific Gherkin steps.

Directories

Path Synopsis
Package aiworkspacecli holds the steps that drive the ap CLI's ai-workspace commands against platform-api, the control plane the CLI treats as its AI Workspace server.
Package aiworkspacecli holds the steps that drive the ap CLI's ai-workspace commands against platform-api, the control plane the CLI treats as its AI Workspace server.
Package apcli drives the ap CLI binary.
Package apcli drives the ap CLI binary.
Package apiportal holds steps that create real subscription, application, and API-key artifacts through api-portal's own REST API — the product that issues subscription tokens and API keys, which reach platform-api (and from there the gateway) as signed webhook events.
Package apiportal holds steps that create real subscription, application, and API-key artifacts through api-portal's own REST API — the product that issues subscription tokens and API keys, which reach platform-api (and from there the gateway) as signed webhook events.
Package common contains reusable integration-suite step mechanics.
Package common contains reusable integration-suite step mechanics.
Package platformapi holds steps for both directions of the platform-api <-> gateway relationship: control_plane.go asserts against artifacts a gateway-controller pushes up to the control plane, and secret_deploy.go creates and deploys artifacts through the control plane's own REST API for the gateway to pull down.
Package platformapi holds steps for both directions of the platform-api <-> gateway relationship: control_plane.go asserts against artifacts a gateway-controller pushes up to the control plane, and secret_deploy.go creates and deploys artifacts through the control plane's own REST API for the gateway to pull down.
Package platformgateway contains platform-gateway-specific integration steps.
Package platformgateway contains platform-gateway-specific integration steps.

Jump to

Keyboard shortcuts

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