Merge pull request #2786 from smarterclayton/load_opaque_objects

Allow runtime.Object to be encoded as runtime.RawExtension
This commit is contained in:
Daniel Smith
2014-12-10 16:24:05 -08:00
20 changed files with 384 additions and 58 deletions

View File

@@ -49,15 +49,6 @@ var apiObjectFuzzer = fuzz.New().NilChance(.5).NumElements(1, 1).Funcs(
// APIVersion and Kind must remain blank in memory.
j.APIVersion = ""
j.Kind = ""
j.Name = c.RandString()
j.ResourceVersion = strconv.FormatUint(c.RandUint64(), 10)
j.SelfLink = c.RandString()
var sec, nsec int64
c.Fuzz(&sec)
c.Fuzz(&nsec)
j.CreationTimestamp = util.Unix(sec, nsec).Rfc3339Copy()
},
func(j *api.TypeMeta, c fuzz.Continue) {
// We have to customize the randomization of TypeMetas because their