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 Jul 23, 2024
1 parent 97863ff commit fc5280d
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 fc5280d

Please sign in to comment.