Documentation
¶
Overview ¶
Package fixture provides per-subtest builders over the Ella Core client SDK for provisioning scenario fixtures (operator, profiles, slices, data networks, policies, subscribers).
Index ¶
- func AssertUsagePositive(ctx context.Context, t *testing.T, c *client.Client, imsis []string, ...)
- type DataNetworkSpec
- type F
- func (f *F) Apply(spec scenarios.FixtureSpec)
- func (f *F) DataNetwork(spec DataNetworkSpec)
- func (f *F) HomeNetworkKey(spec HomeNetworkKeySpec)
- func (f *F) Operator(spec OperatorSpec)
- func (f *F) OperatorDefault()
- func (f *F) Policy(spec PolicySpec)
- func (f *F) Profile(spec ProfileSpec)
- func (f *F) Slice(spec SliceSpec)
- type HomeNetworkKeySpec
- type OperatorSpec
- type PolicySpec
- type ProfileSpec
- type SliceSpec
- type SubscriberSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DataNetworkSpec ¶
DataNetworkSpec describes a PDU session anchor (DNN + IP pool).
func DefaultDataNetworkSpec ¶
func DefaultDataNetworkSpec() DataNetworkSpec
type F ¶
type F struct {
// contains filtered or unexported fields
}
F is a fixture builder bound to one subtest. Methods fail the test via t.Fatalf on API error.
func (*F) Apply ¶
func (f *F) Apply(spec scenarios.FixtureSpec)
Apply provisions every scenario-owned resource in spec and registers t.Cleanup handlers to delete them when the subtest ends. LIFO cleanup order gives the correct reverse-dependency teardown: subscribers, policies, data networks, slices, profiles.
Scoped resources use strict-create semantics — a name collision fails the test so that stray state from a prior run surfaces immediately instead of silently mutating shared state.
Non-scoped resources (operator singleton, home network keys) are applied idempotently and are not cleaned up; they belong to the baseline shared across all subtests.
Rule for scenario authors: reference baseline names (default profile/slice/DN/policy) only when assertions match baseline values. Anything else must be declared under a scoped name.
func (*F) DataNetwork ¶
func (f *F) DataNetwork(spec DataNetworkSpec)
DataNetwork creates the baseline data network if none with the given name exists. A pre-existing DN is left untouched; scenarios needing specific DN parameters must use a distinct name.
func (*F) HomeNetworkKey ¶
func (f *F) HomeNetworkKey(spec HomeNetworkKeySpec)
HomeNetworkKey creates a home network key unless the operator already serves one with the matching public key.
func (*F) Operator ¶
func (f *F) Operator(spec OperatorSpec)
Operator writes the operator ID and tracking TACs.
func (*F) OperatorDefault ¶
func (f *F) OperatorDefault()
OperatorDefault writes scenarios-package defaults to the operator.
func (*F) Policy ¶
func (f *F) Policy(spec PolicySpec)
Policy upserts the baseline policy: when it already exists (e.g. Core's seeded "default"), its config is overwritten to match spec.
func (*F) Profile ¶
func (f *F) Profile(spec ProfileSpec)
Profile upserts the baseline profile: when it already exists (e.g. Core's seeded "default"), its UE-AMBR is overwritten to match spec.
type HomeNetworkKeySpec ¶
HomeNetworkKeySpec carries a hex-encoded X25519 private key and a key identifier.
type OperatorSpec ¶
OperatorSpec captures the singleton operator settings.
type PolicySpec ¶
type PolicySpec struct {
Name string
ProfileName string
SliceName string
DataNetworkName string
SessionAmbrUplink string
SessionAmbrDownlink string
Var5qi int32
Arp int32
}
PolicySpec describes a QoS policy for a (profile, slice, data network) triple.
func DefaultPolicySpec ¶
func DefaultPolicySpec() PolicySpec
type ProfileSpec ¶
ProfileSpec describes a subscriber profile (UE-AMBR bucket).
func DefaultProfileSpec ¶
func DefaultProfileSpec() ProfileSpec
type SliceSpec ¶
SliceSpec describes a network slice.
func DefaultSliceSpec ¶
func DefaultSliceSpec() SliceSpec