HomePhabricator
Diffusion Comm fa38e5944b38

[services] Blob - Switch from memcmp to a simple EQ in database tests

Description

[services] Blob - Switch from memcmp to a simple EQ in database tests

Summary:
@palys-swm revealed a bug related to the use of memcmp in this case:
The test would not fail if the test item is a prefix of the found from database item, because we're comparing only
item.*someItem.size() bytes. We don't need to compare the sizes, because the switch to the simple comparison of strings solves the
problem.

Related diff comment https://phabricator.ashoat.com/D3686#101268

Test Plan: Run yarn test-tunnelbroker-service all tests are run and succeed.

Reviewers: karol-bisztyga, palys-swm

Reviewed By: karol-bisztyga, palys-swm

Subscribers: ashoat, Adrian, atul, karol-bisztyga, benschac, yayabosh, palys-swm

Differential Revision: https://phabricator.ashoat.com/D3696