Skip to content

Commit

Permalink
Add ut
Browse files Browse the repository at this point in the history
  • Loading branch information
proller committed Dec 17, 2024
1 parent 07a0f1c commit 152f1c0
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions cloud/filestore/libs/diagnostics/profile_log_events_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,33 @@ Y_UNIT_TEST_SUITE(TProfileLogEventsTest)
UNIT_ASSERT_VALUES_EQUAL(names.size(), nodeInfo.GetSize());
}

Y_UNIT_TEST(ShouldReadDataResponseInitializeFieldsCorrectly)
{
NProto::TReadDataResponse res;
constexpr auto Size = 42;
TString data{Size, ' '};
res.SetBuffer(data);

NProto::TProfileLogRequestInfo profileLogRequest;
FinalizeProfileLogRequestInfo(profileLogRequest, res);
UNIT_ASSERT_VALUES_EQUAL(
profileLogRequest.GetRanges(0).GetActualBytes(),
Size);
}

Y_UNIT_TEST(ShouldWriteDataResponseInitializeFieldsCorrectly)
{
NProto::TWriteDataResponse res;
constexpr auto Size = 42;
res.SetBytes(Size);

NProto::TProfileLogRequestInfo profileLogRequest;
FinalizeProfileLogRequestInfo(profileLogRequest, res);
UNIT_ASSERT_VALUES_EQUAL(
profileLogRequest.GetRanges(0).GetActualBytes(),
Size);
}

Y_UNIT_TEST(ShouldGetCorrectFuseRequestName)
{
UNIT_ASSERT_VALUES_EQUAL(
Expand Down

0 comments on commit 152f1c0

Please sign in to comment.