credentialsecrettest

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package credentialsecrettest holds test helpers for the credential Secret contract.

Index

Constants

This section is empty.

Variables

View Source
var ControlPlaneSecretRoles = []string{
	"license", "database", "extraEnv", "envFrom", "image pull", "TLS", "Ingress TLS", "CA certificate", "volume",
}

ControlPlaneSecretRoles are the roles, as named in refusal messages, of the Secrets that a CoderControlPlane spec references (#249, #260).

Functions

func RequireNoLeak

func RequireNoLeak(t testing.TB, secrets []string, haystacks map[string]any)

RequireNoLeak fails t when any haystack holds a secret value, or one of the encoded forms that credentialsecret.Redact removes. A haystack is a string, an error, a fmt.Stringer, or any value that encodes to JSON (for example a status struct or an annotation map). name labels haystacks in failures.

func SetControlPlaneSecret added in v0.1.4

func SetControlPlaneSecret(spec *coderv1alpha1.CoderControlPlaneSpec, role, secretName string)

SetControlPlaneSecret makes spec reference secretName in role, or reference no Secret in role when secretName is empty. It changes only the field of role, and keeps each field valid for the CRD.

Types

This section is empty.

Jump to

Keyboard shortcuts

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