You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For testing, Node Monitor does not make API calls, but instead loads pre-fetched json documents that store mock data.
These documents can be found in: data/
Because we are generalizing the software to work on all nodes, not just Allusion's nodes, it is important that we update all the mock data, as well as the tests, to use unfiltered data from the API. https://ic-api.internetcomputer.org/api/v3/nodes
This data can be fetched with cURL in the following way:
All files in data/ should be updated to be unfiltered API output.
data/t0.json (our 'control') should be updated with a generic response from the ic-api.
All other data/*.json files should be manually edited from t0.json to meet the specifications in node_monitor/conftest.py, creating more test cases if the current ones are no longer sufficient.
Tests in tests/test_node_monitor.py should be updated to be generic across all node providers, and should include tests when multiple node providers need to be messaged.
Excerpts from the code displaying both TODOs (for context):
For testing, Node Monitor does not make API calls, but instead loads pre-fetched
json
documents that store mock data.These documents can be found in:
data/
Currently, this data was fetched and with filtered
node_provider_id
applied, so that it only returns Allusion's nodes.https://ic-api.internetcomputer.org/api/v3/nodes?node_provider_id=rbn2y-6vfsb-gv35j-4cyvy-pzbdu-e5aum-jzjg6-5b4n5-vuguf-ycubq-zae
Because we are generalizing the software to work on all nodes, not just Allusion's nodes, it is important that we update all the mock data, as well as the tests, to use unfiltered data from the API.
https://ic-api.internetcomputer.org/api/v3/nodes
This data can be fetched with cURL in the following way:
$ curl "https://ic-api.internetcomputer.org/api/v3/nodes" -o t0.json
Requirements:
data/
should be updated to be unfiltered API output.data/t0.json
(our 'control') should be updated with a generic response from the ic-api.data/*.json
files should be manually edited fromt0.json
to meet the specifications innode_monitor/conftest.py
, creating more test cases if the current ones are no longer sufficient.tests/test_node_monitor.py
should be updated to be generic across all node providers, and should include tests when multiple node providers need to be messaged.Excerpts from the code displaying both TODOs (for context):
node-monitor/tests/conftest.py
Lines 35 to 45 in 50c0821
node-monitor/tests/test_node_monitor.py
Lines 44 to 49 in 50c0821
The text was updated successfully, but these errors were encountered: