diff --git a/packages/backend/src/managers/playground.spec.ts b/packages/backend/src/managers/playground.spec.ts index 21cc07bc0..7864954cc 100644 --- a/packages/backend/src/managers/playground.spec.ts +++ b/packages/backend/src/managers/playground.spec.ts @@ -123,7 +123,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 bf7bb8e2a..f11daf7a5 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 { @@ -48,6 +52,7 @@ vi.mock('@podman-desktop/api', async () => { }, containerEngine: { onEvent: vi.fn(), + listContainers: mocks.listContainers, }, }; }); @@ -66,6 +71,7 @@ afterEach(() => { }); test('check activate ', async () => { + mocks.listContainers.mockReturnValue([]); vi.spyOn(fs.promises, 'readFile').mockImplementation(() => { return Promise.resolve(''); });