mirror of
https://github.com/getumbrel/umbrel.git
synced 2026-10-12 02:14:08 +00:00
Fix app settings tests missing the image cleanup dependency
The app-settings fixture omits `apps.imageCleanup`, so all 11 settings tests fail with `Cannot read properties of undefined (reading 'runOperation')` before exercising the settings behavior. Initialize a real `ImageCleanup` with a no-op sweep in the fixture, matching the app-lifecycle tests and restoring the existing settings assertions.
This commit is contained in:
@@ -8,6 +8,7 @@ import {afterEach, describe, expect, test, vi} from 'vitest'
|
||||
|
||||
import type Umbreld from '../../index.js'
|
||||
import App, {normalizeAppMountTargetPath, normalizeAppStorageSourcePath} from './app.js'
|
||||
import ImageCleanup from './image-cleanup.js'
|
||||
import type {AppManifest} from './schema.js'
|
||||
|
||||
const temporaryDirectories: string[] = []
|
||||
@@ -27,6 +28,7 @@ async function createApp() {
|
||||
eventBus: {emit: vi.fn(async () => undefined)},
|
||||
apps: {
|
||||
instances,
|
||||
imageCleanup: new ImageCleanup(async () => {}, {log: vi.fn(), error: vi.fn()}),
|
||||
getDataRootPathsForApps: vi.fn(async () => []),
|
||||
getDataRootPathRelation: vi.fn(() => null),
|
||||
setFolderAccessSourcePaths: vi.fn(),
|
||||
|
||||
Reference in New Issue
Block a user