From 3f341b0c75b1503a959ebca659ccaae57d71adf6 Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Wed, 9 Dec 2020 15:21:52 -0800 Subject: [PATCH] add devfspath as one of the options to pass back... --- bitelab/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bitelab/__init__.py b/bitelab/__init__.py index fd3bca1..3798adc 100644 --- a/bitelab/__init__.py +++ b/bitelab/__init__.py @@ -422,7 +422,7 @@ async def release_board(board_id, user: str = Depends(lookup_user), ) env = os.environ.copy() - addkeys = { 'iface', 'ip', 'devfsrule' } + addkeys = { 'iface', 'ip', 'devfsrule', 'devfspath' } env.update((k, brd.attrs[k]) for k in addkeys if k in brd.attrs) sub = await asyncio.create_subprocess_exec( @@ -683,6 +683,7 @@ class TestBiteLab(unittest.IsolatedAsyncioTestCase): json.dumps(dict(ip='192.0.2.10', iface='epair0b', devfsrule='14', + devfspath='devpath', )).encode('utf-8')) keydata = 'pubsshkey' @@ -703,6 +704,7 @@ class TestBiteLab(unittest.IsolatedAsyncioTestCase): ip='192.0.2.10', iface='epair0b', devfsrule='14', + devfspath='devpath', ), ).dict() self.assertEqual(res.json(), brdinfo) @@ -762,6 +764,7 @@ class TestBiteLab(unittest.IsolatedAsyncioTestCase): env['ip'] = brdinfo['attrs']['ip'] env['iface'] = brdinfo['attrs']['iface'] env['devfsrule'] = brdinfo['attrs']['devfsrule'] + env['devfspath'] = brdinfo['attrs']['devfspath'] # and that it called the release script cse.assert_called_with(self.settings.setup_script, 'release',