romange / helio

A modern framework for backend development based on io_uring Linux interface
Apache License 2.0
435 stars 49 forks source link

chore: introduce ReadDistributionInfo #276

Closed romange closed 3 months ago

romange commented 3 months ago

It's a vector, not a map

On Tue, Jun 4, 2024, 10:12 PM Shahar Mike @.***> wrote:

@.**** approved this pull request.

In io/io_test.cc https://github.com/romange/helio/pull/276#discussion_r1626491709:

  • auto dist_info = ReadDistributionInfo();
  • EXPECT_TRUE(dist_info);
  • const DistributionInfo& dinfo = *dist_info;
  • auto it =
  • find_if(dinfo.begin(), dinfo.end(), [](auto val) { return val.first == "PRETTY_NAME"; });
  • ASSERT_TRUE(it != dinfo.end());

You could replace this with something along the lines of:

EXPECT_THAT(ReadDistributionInfo(), Optional(Contains(Key("PRETTY_NAME")));

— Reply to this email directly, view it on GitHub https://github.com/romange/helio/pull/276#pullrequestreview-2097202605, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4BFCGDHWH6YWB3V3XYZ33ZFYGQ7AVCNFSM6AAAAABIYQNFAGVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDAOJXGIYDENRQGU . You are receiving this because you modified the open/close state.Message ID: @.***>