Skip to content

Commit

Permalink
tests: Prepopulate the supervisor release service installs
Browse files Browse the repository at this point in the history
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
  • Loading branch information
thgreasi committed Nov 4, 2022
1 parent db4d99b commit 99f44b5
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions tests/integration/models/device.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2778,8 +2778,26 @@ describe('Device Model', function () {
});

describe('balena.models.device.setSupervisorRelease()', function () {
this.timeout(60 * 1000);
givenASupervisorRelease(before);
before(async function () {
const [oldSupervisorRelease] = await balena.pine.get({
resource: 'supervisor_release',
options: {
$filter: {
supervisor_version: 'v11.12.3',
is_for__device_type: this.application.is_for__device_type.__id,
},
},
});
// Set all devices to a supervisor release so that the service installs are already set.
// We shouldn't need to do this.
for (const d of this.devices) {
await balena.models.device.setSupervisorRelease(
d.id,
oldSupervisorRelease.id,
);
}
});
givenASupervisorRelease(before, 'v11.12.4');

it('should set the batch of devices to a specific supervisor release', async function () {
await balena.models.device.setSupervisorRelease(
Expand Down

0 comments on commit 99f44b5

Please sign in to comment.