You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 15, 2022. It is now read-only.
as reminder, this is fundamentally how to do a firmware update:
importgetDeviceInfofrom'@ledgerhq/live-common/lib/getDeviceInfo'importmanagerfrom'@ledgerhq/live-common/lib/manager'importpreparefrom'@ledgerhq/live-common/lib/hw/firmwareUpdate-prepare'importmainfrom'@ledgerhq/live-common/lib/hw/firmwareUpdate-main'constdeviceInfo=awaitwithDevice('')(t=>getDeviceInfo(t))constfirmware=awaitmanager.getLatestFirmwareForDevice(deviceInfo)if(!firmware)return"up to date"concat(prepare('',firmware),main('',firmware)).subscribe(e=>console.log(e))
see that the key part here is getDeviceInfo and getLatestFirmwareForDevice.
For getLatestFirmwareForDevice, we MUST have a end-to-end test. It involves Manager API calls (so it's mainly the backend team's scope) but it's still good to have this end-to-end test. What's cool is that it just takes deviceInfo parameter, so it would be easy to do the same kind of tests but starting from chosen static deviceInfo object. We must do that on every major firmware version we have.
Now, concerning prepare and main, this is way trickier and not something we can actually test, it's more the scope of firmware team to test this part even tho it would be good to have a way to test this (but since a HSM secured channel is involved here, we can't do without a device).
The text was updated successfully, but these errors were encountered:
gre
changed the title
For each firmware version, add an end-to-end test for getLatestFirmwareForDevice
headless test plan for firmware updates. add end-to-end test for getLatestFirmwareForDevice
May 4, 2019
in that context, what could be in fact mocked is the whole "socket session", we could have a split on mocking what createSocket is doing and emit mocked observable events.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
as reminder, this is fundamentally how to do a firmware update:
see that the key part here is
getDeviceInfo
andgetLatestFirmwareForDevice
.For
getDeviceInfo
, we already have tests on many versions and we've recently seen how it's important to have these tests & all versions covered.For
getLatestFirmwareForDevice
, we MUST have a end-to-end test. It involves Manager API calls (so it's mainly the backend team's scope) but it's still good to have this end-to-end test. What's cool is that it just takesdeviceInfo
parameter, so it would be easy to do the same kind of tests but starting from chosen static deviceInfo object. We must do that on every major firmware version we have.Now, concerning
prepare
andmain
, this is way trickier and not something we can actually test, it's more the scope of firmware team to test this part even tho it would be good to have a way to test this (but since a HSM secured channel is involved here, we can't do without a device).The text was updated successfully, but these errors were encountered: