admin

package
v3.3.2 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunCli

func RunCli(args ...string) (string, error)

For admin CLI with kubernetes context

func RunCliWithStdin

func RunCliWithStdin(stdin string, args ...string) (string, error)

Types

type Actions

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

this implements the "when" part of given/when/then

none of the func implement error checks, and that is complete intended, you should check for errors using the Then()

func (*Actions) RunExport

func (a *Actions) RunExport() *Actions

func (*Actions) RunImport

func (a *Actions) RunImport(stdin string) *Actions

func (*Actions) Then

func (a *Actions) Then() *Consequences

type Consequences

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

this implements the "then" part of given/when/then

func (*Consequences) And

func (c *Consequences) And(block func()) *Consequences

func (*Consequences) AndCLIOutput

func (c *Consequences) AndCLIOutput(block func(output string, err error)) *Consequences

func (*Consequences) AndExportedResources

func (c *Consequences) AndExportedResources(block func(resources *utils.ExportedResources, err error))

For use after running export with the exported resources desirialized

func (*Consequences) Given

func (c *Consequences) Given() *Context

func (*Consequences) When

func (c *Consequences) When() *Actions

type Context

type Context struct {
	*fixture.TestState
}

Context implements the "given" part of given/when/then. It embeds fixture.TestState to provide test-specific state that enables parallel test execution.

func Given

func Given(t *testing.T) *Context

func GivenWithSameState

func GivenWithSameState(ctx fixture.TestContext) *Context

GivenWithSameState creates a new Context that shares the same TestState as an existing context. Use this when you need multiple fixture contexts within the same test.

func (*Context) And

func (c *Context) And(block func()) *Context

func (*Context) When

func (c *Context) When() *Actions

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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