gptest

package
v1.15.15 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2024 License: MIT Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllPathsToSlash

func AllPathsToSlash(paths []string) []string

AllPathsToSlash converts a list of paths to their correct platform specific slash representation.

func CliCtx

func CliCtx(ctx context.Context, t *testing.T, args ...string) *cli.Context

CliCtx create a new cli context with the given args parsed.

func CliCtxWithFlags

func CliCtxWithFlags(ctx context.Context, t *testing.T, flags map[string]string, args ...string) *cli.Context

CliCtxWithFlags creates a new cli context with the given args and flags parsed.

func UnsetVars

func UnsetVars(ls ...string) func()

UnsetVars will unset the specified env vars and return a restore func.

Types

type GUnit added in v1.14.4

type GUnit struct {
	Entries    []string
	Recipients []string
	Dir        string
	// contains filtered or unexported fields
}

GUnit is a gopass unit test helper.

func NewGUnitTester added in v1.14.4

func NewGUnitTester(t *testing.T) *GUnit

NewGUnitTester creates a new unit test helper.

func (*GUnit) AddExpiredRecipient added in v1.15.3

func (u *GUnit) AddExpiredRecipient() string

func (GUnit) GPConfig added in v1.14.4

func (u GUnit) GPConfig() string

GPConfig returns the gopass config location.

func (GUnit) GPGHome added in v1.14.4

func (u GUnit) GPGHome() string

GPGHome returns the GnuPG homedir.

func (GUnit) InitStore added in v1.14.4

func (u GUnit) InitStore(name string) error

InitStore initializes the test store.

func (GUnit) StoreDir added in v1.14.4

func (u GUnit) StoreDir(mount string) string

StoreDir returns the password store dir.

type Unit

type Unit struct {
	Entries    []string
	Recipients []string
	Dir        string
	// contains filtered or unexported fields
}

Unit is a gopass unit test helper.

func NewUnitTester

func NewUnitTester(t *testing.T) *Unit

NewUnitTester creates a new unit test helper.

func (Unit) GPConfig

func (u Unit) GPConfig() string

GPConfig returns the gopass config location.

func (Unit) GPGHome

func (u Unit) GPGHome() string

GPGHome returns the GnuPG homedir.

func (Unit) InitStore

func (u Unit) InitStore(name string) error

InitStore initializes the test store.

func (Unit) StoreDir

func (u Unit) StoreDir(mount string) string

StoreDir returns the password store dir.

Jump to

Keyboard shortcuts

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