diff --git a/promhttputil/merge_test.go b/promhttputil/merge_test.go index 415b5e109..c76a3a9b8 100644 --- a/promhttputil/merge_test.go +++ b/promhttputil/merge_test.go @@ -25,6 +25,29 @@ func TestMergeValues(t *testing.T) { antiAffinity model.Time err error }{ + // + // edge-cases + { + name: "nils", + a: nil, + b: nil, + r: nil, + }, + + { + name: "bnil", + a: &model.Scalar{model.SampleValue(10), model.Time(100)}, + b: nil, + r: &model.Scalar{model.SampleValue(10), model.Time(100)}, + }, + + { + name: "anil", + a: nil, + b: &model.Scalar{model.SampleValue(10), model.Time(100)}, + r: &model.Scalar{model.SampleValue(10), model.Time(100)}, + }, + // // Scalar tests {