test

package
v0.8.7 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package test contains test utility code shared between IC and DAM.

Index

Constants

View Source
const (
	// TestClientID is the client ID for tests.
	TestClientID = "00000000-0000-0000-0000-000000000000"
	// TestClientSecret is the client secret for test client.
	TestClientSecret = "00000000-0000-0000-0000-000000000001"
	// TestIssuerURL is the URL of the fake OIDC Issuer service.
	TestIssuerURL = "https://example.org/oidc"
)

Variables

This section is empty.

Functions

func HandlerTests

func HandlerTests(t *testing.T, h serviceHandler, tests []HandlerTest, issuerURL string, cfg *dampb.DamConfig)

HandlerTests run tests on a service handler.

Types

type HandlerTest

type HandlerTest struct {
	ClientID     string
	ClientSecret string
	Name         string
	Method       string
	Path         string
	Input        string
	Params       string
	IsForm       bool
	Persona      string
	Scope        string
	LinkPersona  string
	LinkScope    string
	Output       string
	CmpOptions   cmp.Options
	Status       int
}

HandlerTest holds the test variables for a service handler test.

Directories

Path Synopsis
Package credtest contains test helpers for testing endpoints client credentials requirement.
Package credtest contains test helpers for testing endpoints client credentials requirement.
Package debugutil provides utilities for debugging.
Package debugutil provides utilities for debugging.
Package fakegrpc provides a fake gRPC client/server for testing purpose.
Package fakegrpc provides a fake gRPC client/server for testing purpose.
Package fakehttp provides a fake HTTP server for tests that have dependencies using HTTP clients.
Package fakehttp provides a fake HTTP server for tests that have dependencies using HTTP clients.
Package fakehydra contains fake hydra server for testing
Package fakehydra contains fake hydra server for testing
Package fakeiam provides a fake implementation for IAM services: IAM Admin IAM Credendtials
Package fakeiam provides a fake implementation for IAM services: IAM Admin IAM Credendtials
Package fakeissuer provides a minimal fake OIDC issuer for testing purpose.
Package fakeissuer provides a minimal fake OIDC issuer for testing purpose.
Package fakeoidcissuer contains a fake OIDC issuer which can use in go-oidc provider.
Package fakeoidcissuer contains a fake OIDC issuer which can use in go-oidc provider.
Package fakesdl provides a fake for Stackdriver Logging.
Package fakesdl provides a fake for Stackdriver Logging.
Package fakestore provides a fake in-mem storage.
Package fakestore provides a fake in-mem storage.
Package httptestclient contains a http client request to the given http handler.
Package httptestclient contains a http client request to the given http handler.
Package testhttp contains helpers for test http request.
Package testhttp contains helpers for test http request.

Jump to

Keyboard shortcuts

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