cli

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCommandContext

func NewCommandContext(t *testing.T, server *httptest.Server, outputFormat string) (core.CommandContext, *bytes.Buffer)

func NewCommandContextWithConfig

func NewCommandContextWithConfig(
	t *testing.T,
	server *httptest.Server,
	outputFormat string,
	config core.ConfigContext,
) (core.CommandContext, *bytes.Buffer)

func NewCommandContextWithRedirectPolicy

func NewCommandContextWithRedirectPolicy(
	t *testing.T,
	server *httptest.Server,
	outputFormat string,
) (core.CommandContext, *bytes.Buffer)

Types

type FakeConfig

type FakeConfig struct {
	URL       string
	ActiveApp string
}

FakeConfig is a test stub implementation of the CLI's core.ConfigContext. The app-active accessors are no-ops because the app commands under test here do not use them.

func (*FakeConfig) GetActiveApp

func (f *FakeConfig) GetActiveApp() string

func (*FakeConfig) GetURL

func (f *FakeConfig) GetURL() string

func (*FakeConfig) SetActiveApp

func (f *FakeConfig) SetActiveApp(appID string) error

Jump to

Keyboard shortcuts

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