testutils

package
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TestDomainName Fake domain name for tests / recordings
	TestDomainName = "test.dne-okta.com"
	// ClientAssertionNameValueRE client assertion regular expression format
	ClientAssertionNameValueRE = "client_assertion=[^&]+"
	// ClientAssertionNameValueValue client asserver name and value url encoded format
	ClientAssertionNameValueValue = "client_assertion=abc123"
)

Variables

This section is empty.

Functions

func NewTestClock

func NewTestClock() config.Clock

NewTestClock New test clock constructor

func NewVCRRecorder

func NewVCRRecorder(t *testing.T, transport http.RoundTripper) (rec *recorder.Recorder, err error)

NewVCRRecorder New VCR recording settings

func OsSetEnvIfBlank

func OsSetEnvIfBlank(key, value string) func()

OsSetEnvIfBlank Set env var if its blank and return a clearing function

func VCROktaAPIRequestHook

func VCROktaAPIRequestHook(i *cassette.Interaction) error

VCROktaAPIRequestHook Modifies VCR recordings.

func VCROktaAPIRequestMatcher

func VCROktaAPIRequestMatcher(r *http.Request, i cassette.Request) bool

VCROktaAPIRequestMatcher Defines how VCR will match requests to responses.

Types

type TestClock

type TestClock struct{}

TestClock Is a test clock of the Clock interface

func (TestClock) Now

func (TestClock) Now() time.Time

Now The test clock's now

Jump to

Keyboard shortcuts

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