Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 20430d45 authored by Pierre Neyron's avatar Pierre Neyron :bicyclist:
Browse files

[spec] add README for the inputs and outputs

parent 2a178ddb
No related branches found
No related tags found
1 merge request!10311903 set the chassis property
How to update input files:
==========================
data_* files:
-------------
Uncomment the corresponding `gen_stub()` line in ../oar_properties2_spec.rb and re-run rspec.
oar_* files:
------------
Except the oar_empty.json file which should not have to be regenerated, the other files must be forged from the output of the OAR API.
Steps are:
- fetch the OAR API output for the site: `curl 'https://api.grid5000.fr/stable/sites/nancy/internal/oarapi/resources/details.json?limit=999999' > oar_site.json`
- sort the objects with jq: `cat oar_site.json | jq -S "." > new_oar_site.json; mv {new_,}oar_site.json`
- replace the tested cluster names, e.g. with sed: `sed -ie 's/graffiti/clustera/g' oar_site.json`.
- modify the oar_site.json file as needed for what should be tested.
Since using `vimdiff` or `meld` on the files is very slow, one can use the `diff` and `patch` commands...
Then verify using `git diff` that the generated data matches what you expect.
How to update the output files:
===============================
To update the files, just remove them and run rspec again, they will be regenerated.
Then verify using `git diff` that the generated data matches what you expect.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment