Back to godoc.org

Package fuzzer

v0.16.1
Latest Go to latest

The latest major version is .

Published: Aug 7, 2020 | License: Apache-2.0 | Module: github.com/jetstack/cert-manager

Index

Variables

var Funcs = func(codecs runtimeserializer.CodecFactory) []interface{} {
	return append(acmefuzzer.Funcs(codecs), []interface{}{
		func(s *certmanager.Certificate, c fuzz.Continue) {
			c.FuzzNoCustom(s)

			if len(s.Spec.DNSNames) == 0 {
				s.Spec.DNSNames = []string{s.Spec.CommonName}
			}
			if s.Spec.IssuerRef.Kind == "" {
				s.Spec.IssuerRef.Kind = v1alpha2.IssuerKind
			}
			if s.Spec.Duration == nil {
				s.Spec.Duration = &metav1.Duration{Duration: v1alpha2.DefaultCertificateDuration}
			}
			if s.Spec.RenewBefore == nil {
				s.Spec.RenewBefore = &metav1.Duration{Duration: v1alpha2.DefaultRenewBefore}
			}
		},
		func(s *certmanager.CertificateRequest, c fuzz.Continue) {
			c.FuzzNoCustom(s)

			if s.Spec.IssuerRef.Kind == "" {
				s.Spec.IssuerRef.Kind = v1alpha2.IssuerKind
			}
			if s.Spec.Duration == nil {
				s.Spec.Duration = &metav1.Duration{Duration: v1alpha2.DefaultCertificateDuration}
			}
		},
	}...)
}

Funcs returns the fuzzer functions for the apps api group.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier