pangeatesting

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

go:build integration

Index

Constants

View Source
const (
	Live    TestEnvironment = "LVE"
	Develop                 = "DEV"
	Staging                 = "STG"
)

Variables

This section is empty.

Functions

func CreateFile

func CreateFile(t *testing.T, contents []byte) *os.File

func GetConfigID added in v1.10.0

func GetConfigID(t *testing.T, env TestEnvironment, service string, configNumber int) string

func GetEnvVarOrSkip

func GetEnvVarOrSkip(t *testing.T, varname string) string

func GetMultiConfigTestToken added in v1.10.0

func GetMultiConfigTestToken(t *testing.T, env TestEnvironment) string

func GetTestDomain

func GetTestDomain(t *testing.T, env TestEnvironment) string

func GetTestToken

func GetTestToken(t *testing.T, env TestEnvironment) string

func GetVaultSignatureTestToken added in v1.7.0

func GetVaultSignatureTestToken(t *testing.T, env TestEnvironment) string

func IntegrationAuditVaultConfig added in v1.7.0

func IntegrationAuditVaultConfig(t *testing.T, env TestEnvironment) *pangea.Config

func IntegrationConfig

func IntegrationConfig(t *testing.T, env TestEnvironment) *pangea.Config

func IntegrationMultiConfigConfig added in v1.10.0

func IntegrationMultiConfigConfig(t *testing.T, env TestEnvironment) *pangea.Config

func SetupServer

func SetupServer() (mux *http.ServeMux, serverURL string, teardown func())

SetupServer sets up a test HTTP server

Tests should register handlers on mux which provide mock responses for the API method being tested.

func TestBody

func TestBody(t *testing.T, r *http.Request, want string)

func TestConfig

func TestConfig(url string) *pangea.Config

func TestMethod

func TestMethod(t *testing.T, r *http.Request, want string)

func TestNewRequestAndDoFailure

func TestNewRequestAndDoFailure(t *testing.T, method string, f func(cfg *pangea.Config) error)

Types

type TestEnvironment

type TestEnvironment string

Jump to

Keyboard shortcuts

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