fuzzer

package
v1.16.5-beta.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2019 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Funcs = func(codecs runtimeserializer.CodecFactory) []interface{} {
	return []interface{}{
		func(obj *discovery.EndpointSlice, c fuzz.Continue) {
			c.FuzzNoCustom(obj)

			if obj.AddressType == nil {
				ipAddressType := discovery.AddressTypeIP
				obj.AddressType = &ipAddressType
			}

			for i, endpointPort := range obj.Ports {
				if endpointPort.Name == nil {
					emptyStr := ""
					obj.Ports[i].Name = &emptyStr
				}

				if endpointPort.Protocol == nil {
					protos := []api.Protocol{api.ProtocolTCP, api.ProtocolUDP, api.ProtocolSCTP}
					obj.Ports[i].Protocol = &protos[c.Rand.Intn(len(protos))]
				}
			}
		},
	}
}

Funcs returns the fuzzer functions for the discovery api group.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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