Force etcd2 to use application/json, add base64-wrapper decoder as fallback

This commit is contained in:
Jordan Liggitt
2017-03-15 10:58:15 -04:00
parent a19210f418
commit 87e32c7532
5 changed files with 30 additions and 15 deletions

View File

@@ -349,7 +349,7 @@ func (g TestGroup) StorageCodec() runtime.Codec {
// etcd2 only supports string data - we must wrap any result before returning
// TODO: remove for etcd3 / make parameterizable
if !storageSerializer.EncodesAsText {
s = runtime.NewBase64Serializer(s)
s = runtime.NewBase64Serializer(s, s)
}
ds := recognizer.NewDecoder(s, api.Codecs.UniversalDeserializer())