Bumping k8s dependencies to 1.13
This commit is contained in:
43
vendor/github.com/gogo/protobuf/test/mapdefaults/map_test.go.in
generated
vendored
43
vendor/github.com/gogo/protobuf/test/mapdefaults/map_test.go.in
generated
vendored
@@ -135,46 +135,3 @@ func TestUnmarshalImplicitDefaultKeyValue2(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestUnmarshalIgnoreUnknownField(t *testing.T) {
|
||||
fm := &FakeMap{
|
||||
Entries: []*FakeMapEntry{
|
||||
&FakeMapEntry{
|
||||
Key: "key",
|
||||
Value: "value",
|
||||
Other: "other",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
serializedMsg, err := proto.Marshal(fm)
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to serialize msg: %s", err)
|
||||
}
|
||||
|
||||
msg := &MapTest{}
|
||||
err = proto.Unmarshal(serializedMsg, msg)
|
||||
|
||||
if err != nil {
|
||||
var pb proto.Message = msg
|
||||
_, ok := pb.(proto.Unmarshaler)
|
||||
if !ok {
|
||||
// non-codegen implementation returns error when extra tags are
|
||||
// present.
|
||||
return
|
||||
}
|
||||
t.Fatalf("Unexpected error: %s", err)
|
||||
}
|
||||
|
||||
strStr := msg.StrStr
|
||||
if len(strStr) != 1 {
|
||||
t.Fatal("StrStr map should have 1 key/value pairs")
|
||||
}
|
||||
|
||||
val, ok := strStr["key"]
|
||||
if !ok {
|
||||
t.Fatal("\"key\" not found in StrStr map.")
|
||||
}
|
||||
if val != "value" {
|
||||
t.Fatalf("Unexpected value for \"value\": %s", val)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user