gptest

package
v1.14.4 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: MIT Imports: 14 Imported by: 0

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 added in v1.14.4

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 added in v1.14.4

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 added in v1.14.4

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) 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) Remove added in v1.14.4

func (u *GUnit) Remove()

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