Browse Source

add devfspath as one of the options to pass back...

main
John-Mark Gurney 4 years ago
parent
commit
3f341b0c75
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      bitelab/__init__.py

+ 4
- 1
bitelab/__init__.py View File

@@ -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',


Loading…
Cancel
Save