diff options
author | rorewillo <rorewillo@yandex-team.ru> | 2022-02-10 16:51:00 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:51:00 +0300 |
commit | 7b34adcce01173502f056f3a5053d8ca47945b76 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/monlib/encode/json/json_ut.cpp | |
parent | 708f3525bad4968571f23f3f942ac910ec3f57d3 (diff) | |
download | ydb-7b34adcce01173502f056f3a5053d8ca47945b76.tar.gz |
Restoring authorship annotation for <rorewillo@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/monlib/encode/json/json_ut.cpp')
-rw-r--r-- | library/cpp/monlib/encode/json/json_ut.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/library/cpp/monlib/encode/json/json_ut.cpp b/library/cpp/monlib/encode/json/json_ut.cpp index 29320d2938..09e7909289 100644 --- a/library/cpp/monlib/encode/json/json_ut.cpp +++ b/library/cpp/monlib/encode/json/json_ut.cpp @@ -1264,27 +1264,27 @@ Y_UNIT_TEST_SUITE(TJsonTest) { UNIT_ASSERT_EXCEPTION(DecodeJson(input, e.Get()), yexception); } - Y_UNIT_TEST(DecodeNamedMetrics) { - NProto::TMultiSamplesList samples; - { - IMetricEncoderPtr e = EncoderProtobuf(&samples); - - TString metricsJson = NResource::Find("/named_metrics.json"); - DecodeJson(metricsJson, e.Get(), "sensor"); - } - - UNIT_ASSERT_VALUES_EQUAL(samples.SamplesSize(), 2); - { - const NProto::TMultiSample& s = samples.GetSamples(0); - UNIT_ASSERT_VALUES_EQUAL(s.LabelsSize(), 1); - AssertLabelEqual(s.GetLabels(0), "sensor", "Memory"); - } - { - const NProto::TMultiSample& s = samples.GetSamples(1); - UNIT_ASSERT_VALUES_EQUAL(s.LabelsSize(), 2); - AssertLabelEqual(s.GetLabels(0), "sensor", "QueueSize"); - AssertLabelEqual(s.GetLabels(1), "export", "Oxygen"); - } - } - + Y_UNIT_TEST(DecodeNamedMetrics) { + NProto::TMultiSamplesList samples; + { + IMetricEncoderPtr e = EncoderProtobuf(&samples); + + TString metricsJson = NResource::Find("/named_metrics.json"); + DecodeJson(metricsJson, e.Get(), "sensor"); + } + + UNIT_ASSERT_VALUES_EQUAL(samples.SamplesSize(), 2); + { + const NProto::TMultiSample& s = samples.GetSamples(0); + UNIT_ASSERT_VALUES_EQUAL(s.LabelsSize(), 1); + AssertLabelEqual(s.GetLabels(0), "sensor", "Memory"); + } + { + const NProto::TMultiSample& s = samples.GetSamples(1); + UNIT_ASSERT_VALUES_EQUAL(s.LabelsSize(), 2); + AssertLabelEqual(s.GetLabels(0), "sensor", "QueueSize"); + AssertLabelEqual(s.GetLabels(1), "export", "Oxygen"); + } + } + } |