flux: github.com/weaveworks/flux/pkg/gpg/gpgtest Index | Files

package gpgtest

import "github.com/weaveworks/flux/pkg/gpg/gpgtest"

Index

Package Files

gpg.go

func GPGKey Uses

func GPGKey(t *testing.T) (string, string, func())

GPGKey creates a new, temporary GPG home directory and a public/private key pair. It returns the GPG home directory, the ID of the created key, and a cleanup function to be called after the caller is finished with this key. Since GPG uses /dev/random, this may block while waiting for entropy to become available.

func ImportGPGKey Uses

func ImportGPGKey(t *testing.T, key string) (string, func())

ImportGPGKey imports a gpg key into a temporary home directory. It returns the gpg home directory and a cleanup function to be called after the caller is finished with this key.

Package gpgtest imports 6 packages (graph). Updated 2020-01-12. Refresh now. Tools for package owners.