cernopendata / cernopendata-client

CERN Open Data command-line client
http://cernopendata-client.readthedocs.io/
GNU General Public License v3.0
10 stars 9 forks source link

tests: add test for record with TXT and JSON files. #76

Closed ParthS007 closed 3 years ago

ParthS007 commented 3 years ago

Discussion on MM:

This is for big dataset records, and we always have a record with both TXT and JSON files. (In the past we had a mixture so that some records did not have yet JSON file, but nowadays all do.) The codebase should be ready to assume there might be missing, but actually we don't have any "live" test records... We would have to use mock and mock the REST API reply to have a test case. Which might be a good thing to do to catch all those various non-live corner cases that the client should be ready to deal nicely with...

tiborsimko commented 3 years ago

TXT file example:

$ cernopendata-client get-file-locations --recid 5500 | grep txt
http://opendata.cern.ch/eos/opendata/cms/software/HiggsExample20112012/List_indexfile.txt

JSON file example:

$ cernopendata-client get-file-locations --recid 14200
http://opendata.cern.ch/eos/opendata/cms/validated-runs/Commissioning10/Commissioning10-May19ReReco_900GeV.json
ParthS007 commented 3 years ago

Added test for --recid 282 which has json and txt files in #91