|
@@ -422,7 +422,7 @@ async def release_board(board_id, user: str = Depends(lookup_user), |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
env = os.environ.copy() |
|
|
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) |
|
|
env.update((k, brd.attrs[k]) for k in addkeys if k in brd.attrs) |
|
|
|
|
|
|
|
|
sub = await asyncio.create_subprocess_exec( |
|
|
sub = await asyncio.create_subprocess_exec( |
|
@@ -683,6 +683,7 @@ class TestBiteLab(unittest.IsolatedAsyncioTestCase): |
|
|
json.dumps(dict(ip='192.0.2.10', |
|
|
json.dumps(dict(ip='192.0.2.10', |
|
|
iface='epair0b', |
|
|
iface='epair0b', |
|
|
devfsrule='14', |
|
|
devfsrule='14', |
|
|
|
|
|
devfspath='devpath', |
|
|
)).encode('utf-8')) |
|
|
)).encode('utf-8')) |
|
|
|
|
|
|
|
|
keydata = 'pubsshkey' |
|
|
keydata = 'pubsshkey' |
|
@@ -703,6 +704,7 @@ class TestBiteLab(unittest.IsolatedAsyncioTestCase): |
|
|
ip='192.0.2.10', |
|
|
ip='192.0.2.10', |
|
|
iface='epair0b', |
|
|
iface='epair0b', |
|
|
devfsrule='14', |
|
|
devfsrule='14', |
|
|
|
|
|
devfspath='devpath', |
|
|
), |
|
|
), |
|
|
).dict() |
|
|
).dict() |
|
|
self.assertEqual(res.json(), brdinfo) |
|
|
self.assertEqual(res.json(), brdinfo) |
|
@@ -762,6 +764,7 @@ class TestBiteLab(unittest.IsolatedAsyncioTestCase): |
|
|
env['ip'] = brdinfo['attrs']['ip'] |
|
|
env['ip'] = brdinfo['attrs']['ip'] |
|
|
env['iface'] = brdinfo['attrs']['iface'] |
|
|
env['iface'] = brdinfo['attrs']['iface'] |
|
|
env['devfsrule'] = brdinfo['attrs']['devfsrule'] |
|
|
env['devfsrule'] = brdinfo['attrs']['devfsrule'] |
|
|
|
|
|
env['devfspath'] = brdinfo['attrs']['devfspath'] |
|
|
|
|
|
|
|
|
# and that it called the release script |
|
|
# and that it called the release script |
|
|
cse.assert_called_with(self.settings.setup_script, 'release', |
|
|
cse.assert_called_with(self.settings.setup_script, 'release', |
|
|