package setup
import "github.com/google/trillian/testonly/setup"
Package setup contains test-only code that's useful for setting up tests.
Index ¶
- func NewTLSCertificate(t *testing.T) tls.Certificate
- func SetFlag(t *testing.T, name, value string)
- func TempFile(t *testing.T, prefix string) (*os.File, func())
Functions ¶
func NewTLSCertificate ¶
func NewTLSCertificate(t *testing.T) tls.Certificate
NewTLSCertificate returns a random TLS Certificate for testing.
func SetFlag ¶
SetFlag updates a flag value, failing the test if something goes wrong.
func TempFile ¶
TempFile creates a temporary file to be used in a test, and returns its *os.File handler, as well as a cleanup function.
Source Files ¶
doc.go files.go flags.go tls.go
- Version
- v1.7.1 (latest)
- Published
- Jan 9, 2025
- Platform
- linux/amd64
- Imports
- 10 packages
- Last checked
- 5 days ago –
Tools for package owners.