Refactor PodStatus to PodCondition in internal API for v1beta3
This commit is contained in:
@@ -31,8 +31,8 @@ import (
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta2"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
|
||||
"github.com/fsouza/go-dockerclient"
|
||||
"github.com/google/gofuzz"
|
||||
docker "github.com/fsouza/go-dockerclient"
|
||||
fuzz "github.com/google/gofuzz"
|
||||
)
|
||||
|
||||
var fuzzIters = flag.Int("fuzz_iters", 40, "How many fuzzing iterations to do.")
|
||||
@@ -86,6 +86,10 @@ var apiObjectFuzzer = fuzz.New().NilChance(.5).NumElements(1, 1).Funcs(
|
||||
j.ResourceVersion = strconv.FormatUint(c.RandUint64()>>8, 10)
|
||||
j.SelfLink = c.RandString()
|
||||
},
|
||||
func(j *api.PodCondition, c fuzz.Continue) {
|
||||
statuses := []api.PodCondition{api.PodPending, api.PodRunning, api.PodFailed}
|
||||
*j = statuses[c.Rand.Intn(len(statuses))]
|
||||
},
|
||||
func(intstr *util.IntOrString, c fuzz.Continue) {
|
||||
// util.IntOrString will panic if its kind is set wrong.
|
||||
if c.RandBool() {
|
||||
|
Reference in New Issue
Block a user