diff --git a/src/compose/app.ts b/src/compose/app.ts index 0be8b414..31956936 100644 --- a/src/compose/app.ts +++ b/src/compose/app.ts @@ -189,9 +189,9 @@ export class App { return steps; } - public async stepsToRemoveApp( + public stepsToRemoveApp( state: Omit & { keepVolumes: boolean }, - ): Promise { + ): CompositionStep[] { if (Object.keys(this.services).length > 0) { return Object.values(this.services).map((service) => generateStep('kill', { current: service }), diff --git a/src/compose/application-manager.ts b/src/compose/application-manager.ts index f25ee913..94b7d520 100644 --- a/src/compose/application-manager.ts +++ b/src/compose/application-manager.ts @@ -221,7 +221,7 @@ export async function inferNextSteps( // For apps in the current state but not target, we call their "destructor" for (const id of onlyCurrent) { steps = steps.concat( - await currentApps[id].stepsToRemoveApp({ + currentApps[id].stepsToRemoveApp({ keepVolumes, downloading, containerIds: containerIdsByAppId[id], diff --git a/test/unit/compose/app.spec.ts b/test/unit/compose/app.spec.ts index d6237295..b6e17fa8 100644 --- a/test/unit/compose/app.spec.ts +++ b/test/unit/compose/app.spec.ts @@ -262,12 +262,12 @@ describe('compose/app', () => { .that.deep.includes({ serviceName: 'test' }); }); - it('should correctly infer to remove an app volumes when the app is being removed', async () => { + it('should correctly infer to remove an app volumes when the app is being removed', () => { const current = createApp({ volumes: [Volume.fromComposeObject('test-volume', 1, 'deadbeef')], }); - const steps = await current.stepsToRemoveApp(defaultContext); + const steps = current.stepsToRemoveApp(defaultContext); const [removeVolumeStep] = expectSteps('removeVolume', steps); expect(removeVolumeStep).to.have.property('current').that.deep.includes({