Skip to content

Commit d9ef3b4

Browse files
committed
test_iotlab: Add test for random feature
1 parent 2296910 commit d9ef3b4

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

testutils/tests/test_iotlab.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ def test_stop(monkeypatch, exp_id, expected):
177177
"ctrl_envs, exp_nodes",
178178
[
179179
([{"BOARD": "nrf52dk"}], ["nrf52dk-5.saclay.iot-lab.info"]),
180+
([{"BOARD": "iotlab-m3"}], ["m3-3.saclay.iot-lab.info"]),
180181
(
181182
[{"IOTLAB_NODE": "samr21-21.saclay.iot-lab.info"}],
182183
["samr21-21.saclay.iot-lab.info"],
@@ -199,6 +200,18 @@ def test_start(monkeypatch, ctrl_envs, exp_nodes):
199200
monkeypatch.setattr(
200201
testutils.iotlab, "get_experiment", lambda api, exp_id: {"nodes": exp_nodes}
201202
)
203+
monkeypatch.setattr(
204+
testutils.iotlab,
205+
"info_experiment",
206+
lambda api, site: {
207+
"items": [
208+
{
209+
"state": "Alive",
210+
"network_address": exp_nodes[0],
211+
},
212+
],
213+
},
214+
)
202215
monkeypatch.setattr(testutils.iotlab, "wait_experiment", lambda api, exp_id: {})
203216
ctrls = [MockRIOTCtrl(env) for env in ctrl_envs]
204217
exp = testutils.iotlab.IoTLABExperiment("test", ctrls)

0 commit comments

Comments
 (0)