Skip to content

Commit

Permalink
[tests] minor
Browse files Browse the repository at this point in the history
  • Loading branch information
keeramis committed Jun 21, 2024
1 parent 7f2a19d commit cd1fc18
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions src/cmd/device-protection.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ module.exports = class DeviceProtectionCommands extends CLICommandBase {
*/
async getStatus() {

// FIXME: Fix this logic to accommodate devices in dfu mode.
// To get information for dfu devices, a new API needs to be exposed from Particle-USB to get the dfu segments
// and verify that the segment containing the system-part1 is writable or not. If the segment is writable,
// then the device is not pretected. For now though, let's assume the device is in normal mode and not in dfu mode.
let addToOutput = [];
let s;
try {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/device-protection.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ describe('Wi-Fi Commands [@device,@device-protection]', () => {
it('Attempts to disable protection status on an open device', async () => {
const { stdout, stderr, exitCode } = await cli.run(['device-protection', 'disable']);

expect(stdout).to.include(`[${DEVICE_ID}] (Product ${PRODUCT_01_DEVICE_01_ID}): Open device\nRun particle device-protection enable to protect the device.`);
expect(stdout).to.include(`[${DEVICE_ID}] (Product ${PRODUCT_01_DEVICE_01_ID}) is not a protected device.`);
expect(stderr).to.equal('');
expect(exitCode).to.equal(0);
});
Expand Down

0 comments on commit cd1fc18

Please sign in to comment.