storj/satellite/metainfo
Ivan Fraixedes 0d1ba7bc08 satellite/metainfo: Return error misusing func
Return an error when misusing the endpoint method
'listSegmentsFromNumberOfSegments' because there is the method
'listSegmentsManually' for being used when the number of segments is
less or equal than 0.

If we don't return an error on `listSegmentsFromNumberOfSegments` we
would realize that we have a bug much more later than returning an error
because the clients wouldn't receive an error and would receive an empty
list, making them to wonder what they are doing wrong to receive 0
results before they realize that they could be in front of a bug.

This commit also renames the function to be plural as "numberOfSegments"
parameter and the test function which missed also the end 's'.

Change-Id: I02318685bf36aa3af26545731a1711621a5e2e39
2019-12-11 10:45:56 +00:00
..
batch.go satellite/metainfo: pass streamID/segmentID between Batch request/response (#3311) 2019-10-22 03:23:22 -07:00
config.go satellite/metainfo: Use cockroachdb client for metainfo db 2019-12-05 10:33:54 -07:00
db_test.go private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00
db.go all: add archview annotations (#2964) 2019-09-10 16:24:16 +03:00
loop_test.go private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00
loop.go satellite/metainfo: Fix misspelling in comment (#3636) 2019-11-24 13:04:25 -08:00
metainfo_test.go satellite/metainfo: Return error misusing func 2019-12-11 10:45:56 +00:00
metainfo.go satellite/metainfo: Return error misusing func 2019-12-11 10:45:56 +00:00
service_test.go private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00
service.go satellite/metainfo: don't leak error implementation detail (#3722) 2019-12-10 15:21:30 -05:00
validation.go satellite/metainfo: Improve piece hash validation (#3671) 2019-12-03 14:36:32 +01:00