fuzzer

package
v0.0.0-...-6815946 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: Apache-2.0 Imports: 7 Imported by: 5 modules, 9 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

Index

Constants

This section is empty.

Variables

View Source
var Funcs = fuzzer.MergeFuzzerFuncs(
	func(codecs serializer.CodecFactory) []any {
		return []any{
			func(u *apis.URL, c randfill.Continue) {
				u.Scheme = randStringAtoZ(c.Rand)
				u.Host = randStringAtoZ(c.Rand)
				u.User = url.UserPassword(
					randStringAtoZ(c.Rand),
					randStringAtoZ(c.Rand),
				)
				u.RawPath = url.PathEscape(c.String(0))
				u.RawQuery = url.QueryEscape(c.String(0))
			},
		}
	},
)

Funcs includes fuzzing funcs for knative.dev/serving types

For other examples see https://github.com/kubernetes/apimachinery/blob/master/pkg/apis/meta/fuzzer/fuzzer.go

Functions

func FuzzConditions

func FuzzConditions(accessor apis.ConditionsAccessor, c randfill.Continue)

FuzzConditions fuzzes the values for the conditions. It doesn't add any new condition types

Consumers should initialize their conditions prior to fuzzing them. For example:

func(s *SomeStatus, c fuzz.Continue) {
  c.FuzzNoCustom(s) // fuzz the status object

  // Clear the random fuzzed condition
  s.Status.SetConditions(nil)

  // Fuzz the known conditions except their type value
  s.InitializeConditions()
  fuzz.Conditions(&s.Status, c)
}

Types

This section is empty.

Jump to

Keyboard shortcuts

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