gptest

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2022 License: MIT Imports: 10 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 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 gopass homedir.

func (Unit) InitStore

func (u Unit) InitStore(name string) error

InitStore initializes the test store.

func (*Unit) Remove

func (u *Unit) Remove()

Remove removes 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