certificatesigningrequests

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2021 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Suite

type Suite struct {
	// Name is the name of the issuer being tested, e.g. SelfSigned, CA, ACME
	// This field must be provided.
	Name string

	// CreateIssuerFunc is a function that provisions a new issuer resource and
	// returns an SignerName to that Issuer that will be used as the SignerName
	// on CertificateSigningRequest resources that this suite creates.
	// This field must be provided.
	CreateIssuerFunc func(*framework.Framework) string

	// DeleteIssuerFunc is a function that is run after the test has completed
	// in order to clean up resources created for a test (e.g. the resources
	// created in CreateIssuerFunc).
	// This function will be run regardless whether the test passes or fails.
	// If not specified, this function will be skipped.
	DeleteIssuerFunc func(*framework.Framework, string)

	// ProvisionFunc is a function that is run every test just before the
	// CertificateSigningRequest is created within a test. This is used to
	// provision or create any resources that are required by the Issuer to sign
	// the CertificateSigningRequest. This could be for example to annotate the
	// CertificateSigningRequest, or create a resource like a Secret needed for
	// signing.
	// If not specified, this function will be skipped.
	ProvisionFunc func(*framework.Framework, *certificatesv1.CertificateSigningRequest, crypto.Signer)

	// DeProvisionFunc is run after every test. This is to be used to remove and
	// clean-up any resources which may have been created by ProvisionFunc.
	// If not specified, this function will be skipped.
	DeProvisionFunc func(*framework.Framework, *certificatesv1.CertificateSigningRequest)

	// DomainSuffix is a suffix used on all domain requests.
	// This is useful when the issuer being tested requires special
	// configuration for a set of domains in order for certificates to be
	// issued, such as the ACME issuer.
	// If not set, this will be defaulted to the configured 'domain' for the
	// nginx-ingress addon.
	DomainSuffix string

	// UnsupportedFeatures is a list of features that are not supported by this
	// invocation of the test suite.
	// This is useful if a particular issuers explicitly does not support
	// certain features due to restrictions in their implementation.
	UnsupportedFeatures featureset.FeatureSet
	// contains filtered or unexported fields
}

Suite defines a reusable conformance test suite that can be used against any Issuer implementation.

func (*Suite) Define

func (s *Suite) Define()

Defines simple conformance tests that can be run against any issuer type. If Complete has not been called on this Suite before Define, it will be automatically called. The tests in this file require that the CertificateSigningRequest controllers are active (--feature-gates=ExperimentalCertificateSigningRequestControllers=true). If they are not active, these tests will fail.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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