Documentation
¶
Overview ¶
Package credentialsecrettest holds test helpers for the credential Secret contract.
Index ¶
Constants ¶
This section is empty.
Variables ¶
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 ¶
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.