Documentation
¶
Overview ¶
Package apcli drives the ap CLI binary. It owns the session every CLI step package runs the binary through, and the steps for the CLI's gateway commands, which run against the topology's platform gateway.
Each scenario owns an isolated CLI HOME and scratch workspace, created on first use and removed by the cleanup registry, so the gateways a scenario adds to the CLI configuration are private to it. Resources the CLI deploys to the platform gateway are registered for cleanup as soon as the CLI reports them applied.
Index ¶
Constants ¶
const (
// EnvBinary overrides the location of the ap binary under test.
EnvBinary = "AP_CLI_BINARY"
)
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(sc *godog.ScenarioContext, topo *runtime.Topology, featureRoot string)
Register binds the ap CLI steps.
func ResolveBinary ¶
ResolveBinary locates the ap binary: AP_CLI_BINARY when set, otherwise the build output of 'make -C cli/src build-skip-tests' in this checkout.
Types ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session runs the ap binary with an isolated HOME, so its configuration never touches the developer's real ~/.wso2ap, and from a scratch workspace that relative paths resolve against.
func NewSession ¶
NewSession creates the isolated HOME and workspace and registers them for cleanup, so a failing scenario still removes them.