enkstest

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2022 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Overview

Package enkstest provides test helpers and provisioners.

Index

Constants

View Source
const (
	Audience = "test-aud"
	Issuer   = "test-iss"
	Name     = "Test issuer"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BootstrapResponse

type BootstrapResponse struct {
	Signer             crypto.Signer
	HealthAuthority    *verificationmodel.HealthAuthority
	HealthAuthorityKey *verificationmodel.HealthAuthorityKey
	AuthorizedApp      *authorizedappmodel.AuthorizedApp
	SignatureInfo      *exportmodel.SignatureInfo
	ExportConfig       *exportmodel.ExportConfig
}

BootstrapResponse is the response from a successful bootstrap.

func Bootstrap

func Bootstrap(ctx context.Context, env *serverenv.ServerEnv) (*BootstrapResponse, error)

Bootstrap configures the database with default data.

type Server

type Server struct {
	Server *server.Server
	Env    *serverenv.ServerEnv
}

func NewServer

func NewServer(tb testing.TB, testDatabaseInstance *database.TestInstance) *Server

NewServer sets up local servers for running tests. The server runs on a single address with different subpaths for each service.

func (*Server) AddHealthAuthorityKey added in v0.25.0

func (s *Server) AddHealthAuthorityKey(ctx context.Context, healthAuthority *verificationmodel.HealthAuthority, healthAuthorityKey *verificationmodel.HealthAuthorityKey) error

AddHealthAuthorityKey updates the health authority. This exists so tests can override the PEM without exposing all the internal packages.

Jump to

Keyboard shortcuts

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