diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 6a27309f6b..f16f46d30e 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -17,7 +17,7 @@ "@oclif/core": "^4.0.31", "@sentry/node": "^6.16.1", "balena-config-json": "^4.2.0", - "balena-device-init": "^8.0.0", + "balena-device-init": "^8.1.0-build-detect-boot-partition-46090d3acc07444c97f96e6df8881cd2d708d6ce-1", "balena-errors": "^4.7.3", "balena-image-fs": "^7.0.6", "balena-preload": "^16.0.0", @@ -5887,10 +5887,11 @@ } }, "node_modules/balena-device-init": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/balena-device-init/-/balena-device-init-8.0.0.tgz", - "integrity": "sha512-Kaitk9LA8oQsM1suwqYbVAeJrbmSRM4BbzsYJbczItulxRS6XadPWZeN3OLYEV5eUW2Es2SPdqQqkFvIBZriKg==", + "version": "8.1.0-build-detect-boot-partition-46090d3acc07444c97f96e6df8881cd2d708d6ce-1", + "resolved": "https://registry.npmjs.org/balena-device-init/-/balena-device-init-8.1.0-build-detect-boot-partition-46090d3acc07444c97f96e6df8881cd2d708d6ce-1.tgz", + "integrity": "sha512-H5Tkcrw/NU6ruE6Y3hbFK6GjHSM7FBSZ0Sb/WcpSoJCmlT5H9hA3Nr5cj2/vWJeaDQcEwY92eBHy4ucwk5KojA==", "dependencies": { + "balena-config-json": "^4.2.0", "balena-image-fs": "^7.0.6", "balena-semver": "^2.2.0", "lodash": "^4.17.15", diff --git a/package.json b/package.json index 7e52af8455..cc8612d23c 100644 --- a/package.json +++ b/package.json @@ -196,7 +196,7 @@ "@oclif/core": "^4.0.31", "@sentry/node": "^6.16.1", "balena-config-json": "^4.2.0", - "balena-device-init": "^8.0.0", + "balena-device-init": "^8.1.0-build-detect-boot-partition-46090d3acc07444c97f96e6df8881cd2d708d6ce-1", "balena-errors": "^4.7.3", "balena-image-fs": "^7.0.6", "balena-preload": "^16.0.0", diff --git a/tests/commands/os/configure.spec.ts b/tests/commands/os/configure.spec.ts index e3bc3bd420..2e38a3f494 100644 --- a/tests/commands/os/configure.spec.ts +++ b/tests/commands/os/configure.spec.ts @@ -21,6 +21,7 @@ import * as process from 'process'; import { runCommand } from '../../helpers'; import { promisify } from 'util'; import * as tmp from 'tmp'; +import * as stripIndent from 'common-tags/lib/stripIndent'; tmp.setGracefulCleanup(); const tmpNameAsync = promisify(tmp.tmpName); @@ -62,7 +63,19 @@ if (process.platform !== 'win32') { ]; const { err } = await runCommand(command.join(' ')); - expect(err.join('')).to.equal(''); + // Once we replace the dummy.img with one that includes a os-release & device-type.json + // then we should be able to change this to expect no errors. + expect( + err.flatMap((line) => line.split('\n')).filter((line) => line !== ''), + ).to.deep.equal( + stripIndent` + [warn] "${tmpPath}": + [warn] 1 partition(s) found, but none containing file "/device-type.json". + [warn] Assuming default boot partition number '1'. + [warn] "${tmpPath}": + [warn] Could not find a previous "/config.json" file in partition '1'. + [warn] Proceeding anyway, but this is unexpected.`.split('\n'), + ); // confirm the image contains a config.json... const imagefs = await import('balena-image-fs');