testutils

package
v0.2.12-dev.4 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CaptureOutput

func CaptureOutput(fn func()) (stdout string, stderr string)

func CreateTestAppWithNoopLoggerAndAccess

func CreateTestAppWithNoopLoggerAndAccess(name string, flags []cli.Flag, action cli.ActionFunc) (*cli.App, *logger.NoopLogger)

CreateTestAppWithNoopLoggerAndAccess creates a CLI app with no-op logger and returns both app and logger

Types

type MockKeyring

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

MockKeyring provides a test helper for keyring operations using the native mock

func SetupMockKeyring

func SetupMockKeyring(t *testing.T) *MockKeyring

SetupMockKeyring initializes the native keyring mock for testing

func (*MockKeyring) Clear

func (m *MockKeyring) Clear()

Clear removes all stored keys from the mock

func (*MockKeyring) StorePrivateKey

func (m *MockKeyring) StorePrivateKey(environment, privateKey string) error

StorePrivateKey stores a key using the real implementation (which talks to the mock)

Jump to

Keyboard shortcuts

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