Skip to content

Commit

Permalink
test_iotlab: Add test for random feature
Browse files Browse the repository at this point in the history
  • Loading branch information
MrKevinWeiss committed Jan 31, 2024
1 parent eb7f0d8 commit 1d7f4ef
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions testutils/tests/test_iotlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ def test_stop(monkeypatch, exp_id, expected):
"ctrl_envs, exp_nodes",
[
([{"BOARD": "nrf52dk"}], ["nrf52dk-5.saclay.iot-lab.info"]),
([{"BOARD": "iotlab-m3"}], ["m3-3.saclay.iot-lab.info"]),
(
[{"IOTLAB_NODE": "samr21-21.saclay.iot-lab.info"}],
["samr21-21.saclay.iot-lab.info"],
Expand All @@ -199,6 +200,18 @@ def test_start(monkeypatch, ctrl_envs, exp_nodes):
monkeypatch.setattr(
testutils.iotlab, "get_experiment", lambda api, exp_id: {"nodes": exp_nodes}
)
monkeypatch.setattr(
testutils.iotlab,
"info_experiment",
lambda api, site: {
"items": [
{
"state": "Alive",
"network_address": exp_nodes[0],
},
],
},
)
monkeypatch.setattr(testutils.iotlab, "wait_experiment", lambda api, exp_id: {})
ctrls = [MockRIOTCtrl(env) for env in ctrl_envs]
exp = testutils.iotlab.IoTLABExperiment("test", ctrls)
Expand Down

0 comments on commit 1d7f4ef

Please sign in to comment.