Open remingtonc opened 5 years ago
This test passes in the original bigmuddy repo and the testdata and test itself is the same - this is a failure introduced in this repo.
Very interesting. Does the old repo test against recent Go versions? Looking at your description this issue seems like something related to JSON tags such asomitempty
.
This does appear to be due to the updated vendor dependencies. Copying the vendor/
folder from this project to original pipeline repository yields the same failures.
The crux of the failure is this inclusion: data_gpb:<nil> data_gpbkv:[]
The proto: https://github.com/cisco-ie/pipeline-gnmi/blob/master/vendor/github.com/cisco/bigmuddy-network-telemetry-proto/proto_go/telemetry.pb.go#L85-L89
Should these fields be in the output?
These values should not be there if marshaled correctly. Interestingly these are the only pointers in the struct and although the definition of empty
should be straightforward these are very nested custom types.
TestCodecGPBBasic fails due to different produced and verification data. Produced data includes
data_gpb:<nil>
anddata_gpbkv:[]
whereas the verification data does not include these fields. This is likely due to the samples being compared directly from pure JSON as compared to serializing via Telemetry proto which does contain these fields.Trying to determine which should be correct...