secretstest

package
v1.25.2 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fake

func Fake(key, value string) func()

Mock updates secrets so that any fetch of key would return the provided value. It returns the cleanup function.

Usage:

func TestXYZ(t *testing.T) {
     defer secretstest.Fake("/etc/.honeycomb_api_key", "SOME KEY")()
     ... regular tests ..
}

Types

This section is empty.

Jump to

Keyboard shortcuts

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