configtest

package
v1.140.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package configtest holds the iam assembly profile the loader and binder tests start from, and the edits that turn it into its variants.

Index

Constants

View Source
const Profile = `` /* 978-byte string literal not displayed */

Profile is a complete iam profile hosting auth and data-access on every interface, with the probe left to its default.

View Source
const Secrets = `` /* 221-byte string literal not displayed */

Secrets is the secrets file Profile names: the database credentials for the service and the migration role, the token pair and the OAuth material auth needs. The two roles differ so a test can tell which one a DSN carries.

Variables

This section is empty.

Functions

func ClearEnv added in v1.137.0

func ClearEnv(t *testing.T)

ClearEnv blanks every variable the config loaders read, so a test resolves the profile it set up and not one a developer's shell points at. The names mirror pkg/config/path.go: the YAML and TOML file variables, ENV, and the PLATFORM_ and SERVICES_ overrides the TOML loader accepts.

func DataAccessOnly

func DataAccessOnly(profile string) string

DataAccessOnly rewrites the profile for a process hosting data-access alone: the gRPC listener only, so cors and the auth block go with the domain.

func DatabaseOnly added in v1.137.0

func DatabaseOnly(secrets string) string

DatabaseOnly keeps the database block of the secrets alone, which is all a migration needs.

func WithHosts

func WithHosts(profile string) string

WithHosts pins each listener and the probe to a host, the way Omnibus binds every port on the loopback interface. The HTTP listener gets an IPv6 host.

func WithoutOAuth

func WithoutOAuth(secrets string) string

WithoutOAuth drops the OAuth material from the secrets, as the secrets of a process hosting data-access alone must.

func Write

func Write(t *testing.T, profile, secrets string) string

Write puts the profile and the secrets file it names in a temporary directory and returns the profile's path.

Types

This section is empty.

Jump to

Keyboard shortcuts

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