mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-11 06:02:18 +00:00
Refactor PodStatus to PodCondition in internal API for v1beta3
This commit is contained in:
@@ -26,8 +26,8 @@ import (
|
||||
_ "github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta1"
|
||||
_ "github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta2"
|
||||
"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"
|
||||
)
|
||||
|
||||
// apiObjectFuzzer can randomly populate api objects.
|
||||
@@ -71,6 +71,10 @@ var apiObjectFuzzer = fuzz.New().NilChance(.5).NumElements(1, 1).Funcs(
|
||||
j.ResourceVersion = strconv.FormatUint(c.RandUint64()>>8, 10)
|
||||
j.FieldPath = c.RandString()
|
||||
},
|
||||
func(j *internal.PodCondition, c fuzz.Continue) {
|
||||
statuses := []internal.PodCondition{internal.PodPending, internal.PodRunning, internal.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