testenv

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: BSD-3-Clause Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package testenv stands in for the standard library's internal/testenv in the upstream crypto/tls tests that tlsx carries. It provides only what those tests call, with tlsx's behaviour: the tests never use the external network (the BoGo suite fetches BoringSSL only when asked, see bogo_shim_test.go).

Index

Constants

This section is empty.

Variables

View Source
var GODEBUGChanged func()

GODEBUGChanged, if set, is called when SetGODEBUG changes GODEBUG and when the test restores it: tlsx reads its settings once (x_godebug.go) and its tests set this to make it read them again.

Functions

func Builder

func Builder() string

Builder is the name of the Go project's builder running the test; tlsx never runs on those builders, so it is always "".

func Command

func Command(t testing.TB, name string, args ...string) *exec.Cmd

Command is exec.Command, stopped when the test's context ends.

func Executable

func Executable(t testing.TB) string

Executable is the path of the running test binary.

func GoToolPath

func GoToolPath(t testing.TB) string

GoToolPath is the go command on PATH (with GOTOOLCHAIN honoured by it).

func MustHaveExecPath

func MustHaveExecPath(t testing.TB, program string)

MustHaveExecPath skips the test when the program is not on PATH.

func MustHaveExternalNetwork

func MustHaveExternalNetwork(t testing.TB)

MustHaveExternalNetwork skips the test.

func SetGODEBUG

func SetGODEBUG(t testing.TB, godebug string)

SetGODEBUG appends a setting to GODEBUG for the test, as Go's testenv does (the test must not be parallel).

Types

This section is empty.

Jump to

Keyboard shortcuts

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