diff --git a/packages/backend/src/managers/playground.spec.ts b/packages/backend/src/managers/playground.spec.ts index 3ff7df873..90956bddd 100644 --- a/packages/backend/src/managers/playground.spec.ts +++ b/packages/backend/src/managers/playground.spec.ts @@ -114,7 +114,8 @@ test('startPlayground should download image if not present then create container }, Image: 'image1', Labels: { - 'ia-studio-model': 'model1', + 'ai-studio-model-id': 'model1', + 'ai-studio-model-port': '8085', }, }); }); diff --git a/packages/backend/src/studio.spec.ts b/packages/backend/src/studio.spec.ts index f15bec5d8..68fed8dac 100644 --- a/packages/backend/src/studio.spec.ts +++ b/packages/backend/src/studio.spec.ts @@ -32,6 +32,10 @@ const mockedExtensionContext = { const studio = new Studio(mockedExtensionContext); +const mocks = vi.hoisted(() => ({ + listContainers: vi.fn(), +})); + vi.mock('@podman-desktop/api', async () => { return { Uri: class { @@ -46,6 +50,9 @@ vi.mock('@podman-desktop/api', async () => { }, }), }, + containerEngine: { + listContainers: mocks.listContainers, + }, }; }); @@ -63,6 +70,7 @@ afterEach(() => { }); test('check activate ', async () => { + mocks.listContainers.mockReturnValue([]); vi.spyOn(fs.promises, 'readFile').mockImplementation(() => { return Promise.resolve(''); });