storj/cmd
Ivan Fraixedes e961b1840c
cmd/segment-reaper: Implement unit test for observer (#3658)
Implement some unit test cases for the observer.processSegment method and fix a bug found by these tests.

A production snapshot is more certain but it's huge for having in the repository and run the test with it by the CI.
We want to have tests for the different cases to detect zombie segments and relaying on production data cannot guarantee to have all of them.

NOTE the test has been implemented with random values for not having always the same combination of segments list and the same values avoiding that the implementation gets stale due to the test. The issue about this is that it's harder to understand and we could get only sometimes failures in the CI in case that the implementation has some bug.

The random tests allow to eventually check cases that a static test may now cover because it is not expressed or because it is needed to implement a large number of cases.

Because we are worried that the test implementation is complex and we could have bugs on it despite that the same bugs should exist in both, the implementation and the test, moreover that we have to consider that the implementation and the tests have been written by different people. Because of that, we may replace entirely these random tests by a list of static ones.
2019-12-10 11:01:58 +01:00
..
certificates private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00
gateway lib/uplink: explain safe versions (#3644) 2019-11-25 16:55:54 +01:00
identity private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00
inspector satellite/payments: invoice creation (#3468) 2019-11-05 15:16:02 +02:00
internal private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00
linksharing private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00
s3-benchmark private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00
satellite storj-sim: work with cockroach:// urls for satellite databases 2019-12-09 23:44:00 +00:00
segment-reaper cmd/segment-reaper: Implement unit test for observer (#3658) 2019-12-10 11:01:58 +01:00
statreceiver private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00
storagenode add completion receipt to exit-status cli command on storage node (#3650) 2019-11-26 12:32:26 -05:00
storagenode-updater storagenode/updater: read identity location from storagenode's config.yaml (#3607) 2019-11-22 15:57:37 +02:00
storj-sim storj-sim: work with cockroach:// urls for satellite databases 2019-12-09 23:44:00 +00:00
uplink lib/uplink: explain safe versions (#3644) 2019-11-25 16:55:54 +01:00
versioncontrol private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00