test_utils

package
v0.0.0-...-c116fac Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateJWK

func GenerateJWK() (jwk.Key, jwk.Set, string, error)

GenerateJWK generates a JWK private key and a corresponding JWKS public key, and the string representation of the public key

func RegistryMockup

func RegistryMockup(t *testing.T, prefix string) *httptest.Server

For these tests, we only need to lookup key locations. Create a dummy registry that only returns the jwks_uri location for the given key. Once a server is instantiated, it will only return locations for the provided prefix. To change prefixes, create a new registry mockup.

func TestContext

func TestContext(ictx context.Context, t *testing.T) (ctx context.Context, cancel context.CancelFunc, egrp *errgroup.Group)

Types

This section is empty.

Jump to

Keyboard shortcuts

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