From 03ffe5d673463e1956cc91c0475d81221a20c090 Mon Sep 17 00:00:00 2001 From: Sean Zellmer Date: Thu, 19 Dec 2024 17:03:43 -0600 Subject: [PATCH] Remove `bare` flag from `helper.stage()`, etc in tests `bare` was removed in 9141cec823d889e8aac64194dddaa817da27ee07 when `drive-analyzer` was added. --- test/01-smoke.test.js | 8 ++++---- test/02-teardown.test.js | 6 +++--- test/03-worker.test.js | 6 +++--- test/04-encrypted.test.js | 4 ++-- test/05-updates.test.js | 18 +++++++++--------- test/06-shutdown.test.js | 6 +++--- test/07-warmup.test.js | 10 +++++----- test/helper.js | 2 +- 8 files changed, 30 insertions(+), 30 deletions(-) diff --git a/test/01-smoke.test.js b/test/01-smoke.test.js index a5f1d17e7..d1edc4843 100644 --- a/test/01-smoke.test.js +++ b/test/01-smoke.test.js @@ -22,7 +22,7 @@ test('smoke', async function ({ ok, is, alike, plan, comment, teardown, timeout const id = Math.floor(Math.random() * 10000) comment('staging') - const staging = helper.stage({ channel: `test-${id}`, name: `test-${id}`, dir, dryRun: false, bare: true }) + const staging = helper.stage({ channel: `test-${id}`, name: `test-${id}`, dir, dryRun: false }) teardown(() => Helper.teardownStream(staging)) const staged = await Helper.pick(staging, { tag: 'final' }) ok(staged.success, 'stage succeeded') @@ -58,7 +58,7 @@ test('smoke', async function ({ ok, is, alike, plan, comment, teardown, timeout const id = Math.floor(Math.random() * 10000) comment('staging') - const staging = helper.stage({ channel: `test-${id}`, name: `test-${id}`, dir, dryRun: false, bare: true }) + const staging = helper.stage({ channel: `test-${id}`, name: `test-${id}`, dir, dryRun: false }) teardown(() => Helper.teardownStream(staging)) const staged = await Helper.pick(staging, { tag: 'final' }) ok(staged.success, 'stage succeeded') @@ -100,7 +100,7 @@ test('app with assets', async function ({ ok, is, plan, comment, teardown, timeo const id = Math.floor(Math.random() * 10000) comment('staging') - const staging = helper.stage({ channel: `test-${id}`, name: `test-${id}`, dir, dryRun: false, bare: true }) + const staging = helper.stage({ channel: `test-${id}`, name: `test-${id}`, dir, dryRun: false }) teardown(() => Helper.teardownStream(staging)) const staged = await Helper.pick(staging, { tag: 'final' }) ok(staged.success, 'stage succeeded') @@ -138,7 +138,7 @@ test('app with assets in sub dep', async function ({ ok, is, plan, comment, tear const id = Math.floor(Math.random() * 10000) comment('staging') - const staging = helper.stage({ channel: `test-${id}`, name: `test-${id}`, dir, dryRun: false, bare: true }) + const staging = helper.stage({ channel: `test-${id}`, name: `test-${id}`, dir, dryRun: false }) teardown(() => Helper.teardownStream(staging)) const staged = await Helper.pick(staging, { tag: 'final' }) ok(staged.success, 'stage succeeded') diff --git a/test/02-teardown.test.js b/test/02-teardown.test.js index 1997a69e1..b77e75f78 100644 --- a/test/02-teardown.test.js +++ b/test/02-teardown.test.js @@ -22,7 +22,7 @@ test('teardown on pipe end', { skip: isWindows }, async function ({ ok, is, plan const id = Math.floor(Math.random() * 10000) comment('staging') - const staging = helper.stage({ channel: `test-${id}`, name: `test-${id}`, dir, dryRun: false, bare: true }) + const staging = helper.stage({ channel: `test-${id}`, name: `test-${id}`, dir, dryRun: false }) teardown(() => Helper.teardownStream(staging)) const staged = await Helper.pick(staging, { tag: 'final' }) ok(staged.success, 'stage succeeded') @@ -58,7 +58,7 @@ test('teardown on os kill', { skip: isWindows }, async function ({ ok, is, plan, const id = Math.floor(Math.random() * 10000) comment('staging') - const staging = helper.stage({ channel: `test-${id}`, name: `test-${id}`, dir, dryRun: false, bare: true }) + const staging = helper.stage({ channel: `test-${id}`, name: `test-${id}`, dir, dryRun: false }) teardown(() => Helper.teardownStream(staging)) const staged = await Helper.pick(staging, { tag: 'final' }) ok(staged.success, 'stage succeeded') @@ -97,7 +97,7 @@ test('teardown on os kill with exit code', { skip: isWindows }, async function ( const id = Math.floor(Math.random() * 10000) comment('staging') - const staging = helper.stage({ channel: `test-${id}`, name: `test-${id}`, dir, dryRun: false, bare: true }) + const staging = helper.stage({ channel: `test-${id}`, name: `test-${id}`, dir, dryRun: false }) teardown(() => Helper.teardownStream(staging)) const staged = await Helper.pick(staging, { tag: 'final' }) ok(staged.success, 'stage succeeded') diff --git a/test/03-worker.test.js b/test/03-worker.test.js index 93d5eec3e..5415eb304 100644 --- a/test/03-worker.test.js +++ b/test/03-worker.test.js @@ -67,7 +67,7 @@ test('worker should run directly in a terminal app', async function ({ is, plan, const testId = Math.floor(Math.random() * 100000) comment('Staging worker-runner...') - const staging = helper.stage({ channel: `test-${testId}`, name: `test-${testId}`, key: null, dir: workerRunner, cmdArgs: [], dryRun: false, bare: true, ignore: [] }) + const staging = helper.stage({ channel: `test-${testId}`, name: `test-${testId}`, key: null, dir: workerRunner, cmdArgs: [], dryRun: false, ignore: [] }) teardown(() => Helper.teardownStream(staging)) const until = await Helper.pick(staging, [{ tag: 'staging' }, { tag: 'final' }]) const { link } = await until.staging @@ -91,14 +91,14 @@ test('worker should run as a link in a terminal app', async function ({ is, plan const testId = Math.floor(Math.random() * 100000) comment('Staging worker-runner...') - const staging1 = helper.stage({ channel: `test-${testId}`, name: `test-${testId}`, key: null, dir: workerRunner, cmdArgs: [], dryRun: false, bare: true, ignore: [] }) + const staging1 = helper.stage({ channel: `test-${testId}`, name: `test-${testId}`, key: null, dir: workerRunner, cmdArgs: [], dryRun: false, ignore: [] }) teardown(() => Helper.teardownStream(staging1)) const until1 = await Helper.pick(staging1, [{ tag: 'staging' }, { tag: 'final' }]) const { link: runnerLink } = await until1.staging await until1.final comment('Staging worker...') - const staging2 = helper.stage({ channel: `test-worker-${testId}`, name: `test-worker-${testId}`, key: null, dir: helloWorld, cmdArgs: [], dryRun: false, bare: true, ignore: [] }) + const staging2 = helper.stage({ channel: `test-worker-${testId}`, name: `test-worker-${testId}`, key: null, dir: helloWorld, cmdArgs: [], dryRun: false, ignore: [] }) teardown(() => Helper.teardownStream(staging2)) const until2 = await Helper.pick(staging2, [{ tag: 'staging' }, { tag: 'final' }]) const { link: workerLink } = await until2.staging diff --git a/test/04-encrypted.test.js b/test/04-encrypted.test.js index 310d1b47c..722688383 100644 --- a/test/04-encrypted.test.js +++ b/test/04-encrypted.test.js @@ -31,13 +31,13 @@ test('stage, seed and run encrypted app', async function ({ ok, is, plan, commen is(encryptionKey.name, name) comment('staging throws without encryption key') - const stagingA = helper.stage({ channel: `test-${id}`, name: `test-${id}`, dir, dryRun: false, bare: true }) + const stagingA = helper.stage({ channel: `test-${id}`, name: `test-${id}`, dir, dryRun: false }) teardown(() => Helper.teardownStream(stagingA)) const error = await Helper.pick(stagingA, { tag: 'error' }) is(error.code, 'ERR_PERMISSION_REQUIRED') comment('staging with encryption key') - const stagingB = helper.stage({ channel: `test-${id}`, name: `test-${id}`, dir, dryRun: false, encryptionKey: name, bare: true }) + const stagingB = helper.stage({ channel: `test-${id}`, name: `test-${id}`, dir, dryRun: false, encryptionKey: name }) teardown(() => Helper.teardownStream(stagingB)) const final = await Helper.pick(stagingB, { tag: 'final' }) ok(final.success, 'stage succeeded') diff --git a/test/05-updates.test.js b/test/05-updates.test.js index 0dd3bcd7b..0d2cb5f27 100644 --- a/test/05-updates.test.js +++ b/test/05-updates.test.js @@ -6,7 +6,7 @@ const hypercoreid = require('hypercore-id-encoding') const Helper = require('./helper') const updates = path.join(Helper.localDir, 'test', 'fixtures', 'updates') const seedOpts = (id) => ({ channel: `test-${id}`, name: `test-${id}`, key: null, dir: updates, cmdArgs: [] }) -const stageOpts = (id, dir) => ({ ...seedOpts(id, dir), dryRun: false, bare: true, ignore: [] }) +const stageOpts = (id, dir) => ({ ...seedOpts(id, dir), dryRun: false, ignore: [] }) const releaseOpts = (id, key) => ({ channel: `test-${id}`, name: `test-${id}`, key }) const ts = () => new Date().toISOString().replace(/[:.]/g, '-') const rig = new Helper.Rig() @@ -171,7 +171,7 @@ test('Pear.updates should notify Platform stage updates (different pear instance const channel = 'test-fixture' comment('staging app') - const appStaging = appStager.stage({ channel, name: channel, dir: updates, dryRun: false, bare: true }) + const appStaging = appStager.stage({ channel, name: channel, dir: updates, dryRun: false }) teardown(() => Helper.teardownStream(appStaging)) const appFinal = await Helper.pick(appStaging, { tag: 'final' }) ok(appFinal.success, 'stage succeeded') @@ -212,7 +212,7 @@ test('Pear.updates should notify Platform stage updates (different pear instance teardown(() => { try { fs.unlinkSync(path.join(rig.artefactDir, file)) } catch { /* ignore */ } }, { order: -Infinity }) comment('restaging rig platform') - const staging = rig.local.stage({ channel: `test-${rig.id}`, name: `test-${rig.id}`, dir: rig.artefactDir, dryRun: false, bare: true }) + const staging = rig.local.stage({ channel: `test-${rig.id}`, name: `test-${rig.id}`, dir: rig.artefactDir, dryRun: false }) teardown(() => Helper.teardownStream(staging)) await Helper.pick(staging, { tag: 'final' }) comment('rig platform restaged') @@ -241,7 +241,7 @@ test('Pear.updates should notify Platform stage, Platform release updates (diffe const channel = 'test-fixture' comment('staging app') - const appStaging = appStager.stage({ channel, name: channel, dir: updates, dryRun: false, bare: true }) + const appStaging = appStager.stage({ channel, name: channel, dir: updates, dryRun: false }) teardown(() => Helper.teardownStream(appStaging)) const appFinal = await Helper.pick(appStaging, { tag: 'final' }) ok(appFinal.success, 'stage succeeded') @@ -283,7 +283,7 @@ test('Pear.updates should notify Platform stage, Platform release updates (diffe teardown(() => { fs.unlinkSync(path.join(rig.artefactDir, file)) }, { order: -Infinity }) comment('restaging rig platform') - const staging = rig.local.stage({ channel: `test-${rig.id}`, name: `test-${rig.id}`, dir: rig.artefactDir, dryRun: false, bare: true }) + const staging = rig.local.stage({ channel: `test-${rig.id}`, name: `test-${rig.id}`, dir: rig.artefactDir, dryRun: false }) teardown(() => Helper.teardownStream(staging)) await Helper.pick(staging, { tag: 'final' }) comment('rig platform restaged') @@ -325,7 +325,7 @@ test('Pear.updates should notify App stage updates (different pear instances)', const channel = 'test-fixture' comment('staging app') - const appStaging = appStager.stage({ channel, name: channel, dir: updates, dryRun: false, bare: true }) + const appStaging = appStager.stage({ channel, name: channel, dir: updates, dryRun: false }) teardown(() => Helper.teardownStream(appStaging)) const appFinal = await Helper.pick(appStaging, { tag: 'final' }) ok(appFinal.success, 'stage succeeded') @@ -368,7 +368,7 @@ test('Pear.updates should notify App stage updates (different pear instances)', const appStager2 = new Helper(rig) teardown(() => appStager2.close(), { order: Infinity }) await appStager2.ready() - const appStaging2 = appStager2.stage({ channel, name: channel, dir: updates, dryRun: false, bare: true }) + const appStaging2 = appStager2.stage({ channel, name: channel, dir: updates, dryRun: false }) teardown(() => Helper.teardownStream(appStaging2)) const appFinal2 = await Helper.pick(appStaging2, { tag: 'final' }) ok(appFinal2.success, 'stage succeeded') @@ -397,7 +397,7 @@ test('Pear.updates should notify App stage, App release updates (different pear const channel = 'test-fixture' comment('staging app') - const appStaging = appStager.stage({ channel, name: channel, dir: updates, dryRun: false, bare: true }) + const appStaging = appStager.stage({ channel, name: channel, dir: updates, dryRun: false }) teardown(() => Helper.teardownStream(appStaging)) const appFinal = await Helper.pick(appStaging, { tag: 'final' }) ok(appFinal.success, 'stage succeeded') @@ -441,7 +441,7 @@ test('Pear.updates should notify App stage, App release updates (different pear const appStager2 = new Helper(rig) teardown(() => appStager2.close(), { order: Infinity }) await appStager2.ready() - const appStaging2 = appStager2.stage({ channel, name: channel, dir: updates, dryRun: false, bare: true }) + const appStaging2 = appStager2.stage({ channel, name: channel, dir: updates, dryRun: false }) teardown(() => Helper.teardownStream(appStaging2)) const appFinal2 = await Helper.pick(appStaging2, { tag: 'final' }) ok(appFinal2.success, 'stage succeeded') diff --git a/test/06-shutdown.test.js b/test/06-shutdown.test.js index 18fa04d44..1f972731b 100644 --- a/test/06-shutdown.test.js +++ b/test/06-shutdown.test.js @@ -67,7 +67,7 @@ test.hook('prepare low-spindown platform', async (t) => { t.teardown(() => rigHelper.close(), { order: Infinity }) await rigHelper.ready() - const patchedStager = rigHelper.stage({ channel: 'test-spindown-ls', name: 'test-spindown-ls', dir: patchedArtefactDir, dryRun: false, bare: true }) + const patchedStager = rigHelper.stage({ channel: 'test-spindown-ls', name: 'test-spindown-ls', dir: patchedArtefactDir, dryRun: false }) const patchedStagerUntil = await Helper.pick(patchedStager, [{ tag: 'final' }]) await patchedStagerUntil.final @@ -149,7 +149,7 @@ test('sidecar should not spindown until ongoing update is finished', async (t) = t.teardown(() => rigHelper.close(), { order: Infinity }) await rigHelper.ready() - const patchedStager = rigHelper.stage({ channel: 'test-spindown-throttled', name: 'test-spindown-throttled', dir: patchedArtefactDir, dryRun: false, bare: true }) + const patchedStager = rigHelper.stage({ channel: 'test-spindown-throttled', name: 'test-spindown-throttled', dir: patchedArtefactDir, dryRun: false }) const patchedStagerUntil = await Helper.pick(patchedStager, [{ tag: 'final' }]) await patchedStagerUntil.final @@ -175,7 +175,7 @@ test('sidecar should not spindown until ongoing update is finished', async (t) = await rcvHelper.ready() t.comment('\tStaging platform using rcv') - const stager = rcvHelper.stage({ channel: 'test-spindown', name: 'test-spindown', dir: rig.artefactDir, dryRun: false, bare: true }) + const stager = rcvHelper.stage({ channel: 'test-spindown', name: 'test-spindown', dir: rig.artefactDir, dryRun: false }) const stagerUntil = await Helper.pick(stager, [{ tag: 'addendum' }, { tag: 'final' }]) const staged = await stagerUntil.addendum await stagerUntil.final diff --git a/test/07-warmup.test.js b/test/07-warmup.test.js index d35baac3b..1f440203d 100644 --- a/test/07-warmup.test.js +++ b/test/07-warmup.test.js @@ -27,7 +27,7 @@ test('stage warmup with entrypoints', async function ({ ok, is, plan, comment, t const id = Math.floor(Math.random() * 10000) comment('staging') - const staging = helper.stage({ channel: `test-${id}`, name: `test-${id}`, dir, dryRun: false, bare: true }) + const staging = helper.stage({ channel: `test-${id}`, name: `test-${id}`, dir, dryRun: false }) teardown(() => Helper.teardownStream(staging)) const staged = await Helper.pick(staging, [{ tag: 'warming' }, { tag: 'final' }]) @@ -52,7 +52,7 @@ test('stage desktop app warmup with entrypoints', async function ({ ok, is, plan const id = Math.floor(Math.random() * 10000) comment('staging') - const staging = helper.stage({ channel: `test-${id}`, name: `test-${id}`, dir, dryRun: false, bare: true }) + const staging = helper.stage({ channel: `test-${id}`, name: `test-${id}`, dir, dryRun: false }) teardown(() => Helper.teardownStream(staging)) const staged = await Helper.pick(staging, [{ tag: 'warming' }, { tag: 'final' }]) @@ -77,7 +77,7 @@ test('stage warmup with prefetch', async function ({ ok, is, plan, comment, tear const id = Math.floor(Math.random() * 10000) comment('staging') - const staging = helper.stage({ channel: `test-${id}`, name: `test-${id}`, dir, dryRun: false, bare: true }) + const staging = helper.stage({ channel: `test-${id}`, name: `test-${id}`, dir, dryRun: false }) teardown(() => Helper.teardownStream(staging)) const staged = await Helper.pick(staging, [{ tag: 'warming' }, { tag: 'final' }]) @@ -101,7 +101,7 @@ test('staged bundle contains entries metadata', async function ({ ok, is, plan, const id = Math.floor(Math.random() * 10000) comment('staging') - const staging = helper.stage({ channel: `test-${id}`, name: `test-${id}`, dir, dryRun: false, bare: true }) + const staging = helper.stage({ channel: `test-${id}`, name: `test-${id}`, dir, dryRun: false }) teardown(() => Helper.teardownStream(staging)) const staged = await Helper.pick(staging, [{ tag: 'warming' }, { tag: 'final' }]) @@ -148,7 +148,7 @@ test('stage with ignore', async function ({ ok, is, plan, teardown }) { const id = Math.floor(Math.random() * 10000) - const staging = helper.stage({ channel: `test-${id}`, name: `test-${id}`, dir, dryRun: false, bare: true }) + const staging = helper.stage({ channel: `test-${id}`, name: `test-${id}`, dir, dryRun: false }) teardown(() => Helper.teardownStream(staging)) const stagingFiles = [] diff --git a/test/helper.js b/test/helper.js index eaa246024..2417788f2 100644 --- a/test/helper.js +++ b/test/helper.js @@ -51,7 +51,7 @@ class Rig { comment('connected to sidecar') comment('staging platform...') - const staging = this.local.stage({ channel: `test-${this.id}`, name: `test-${this.id}`, dir: this.artefactDir, dryRun: false, bare: true }) + const staging = this.local.stage({ channel: `test-${this.id}`, name: `test-${this.id}`, dir: this.artefactDir, dryRun: false }) await Helper.pick(staging, { tag: 'final' }) comment('platform staged')