Part 2 of plural ports: make endpoints a struct
Includes conversions for v1b[12] and tests and fixups for call sites.
This commit is contained in:
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
package testing
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"strconv"
|
||||
"testing"
|
||||
@@ -233,6 +234,11 @@ func FuzzerFor(t *testing.T, version string, src rand.Source) *fuzz.Fuzzer {
|
||||
|
||||
s.Type = api.SecretTypeOpaque
|
||||
},
|
||||
func(ep *api.Endpoint, c fuzz.Continue) {
|
||||
// TODO: If our API used a particular type for IP fields we could just catch that here.
|
||||
ep.IP = fmt.Sprintf("%d.%d.%d.%d", c.Rand.Intn(256), c.Rand.Intn(256), c.Rand.Intn(256), c.Rand.Intn(256))
|
||||
ep.Port = c.Rand.Intn(65536)
|
||||
},
|
||||
)
|
||||
return f
|
||||
}
|
||||
|
Reference in New Issue
Block a user