diff --git a/server/src/tests/unit-tests/modules/automations/DockerActionComponent.test.ts b/server/src/tests/unit-tests/modules/automations/DockerActionComponent.test.ts index a16b8444..587617f5 100644 --- a/server/src/tests/unit-tests/modules/automations/DockerActionComponent.test.ts +++ b/server/src/tests/unit-tests/modules/automations/DockerActionComponent.test.ts @@ -46,7 +46,7 @@ vi.mock('../../../../services/ContainerUseCases', async (importOriginal) => { return { ...(await importOriginal()), default: { - performAction: (container: Container, action: SsmContainer.Actions) => { + performDockerAction: (container: Container, action: SsmContainer.Actions) => { if (action === SsmContainer.Actions.PAUSE) { return; } @@ -60,7 +60,7 @@ describe('DockerActionComponent', () => { beforeEach(async () => { vi.resetAllMocks(); vi.spyOn(ContainerRepo, 'findContainerById'); - vi.spyOn(ContainerUseCases, 'performAction'); + vi.spyOn(ContainerUseCases, 'performDockerAction'); }); afterEach(() => { vi.restoreAllMocks(); @@ -78,8 +78,8 @@ describe('DockerActionComponent', () => { await dockerActionComponent.executeAction(); expect(ContainerRepo.findContainerById).toHaveBeenCalledWith('container1'); - expect(ContainerUseCases.performAction).toHaveBeenCalledTimes(2); // Assuming you have two containers - expect(ContainerUseCases.performAction).toHaveBeenCalledWith(fakeContainer, dockerAction); + expect(ContainerUseCases.performDockerAction).toHaveBeenCalledTimes(2); // Assuming you have two containers + expect(ContainerUseCases.performDockerAction).toHaveBeenCalledWith(fakeContainer, dockerAction); }); test('executeAction handles no containers provided', async () => { @@ -92,7 +92,7 @@ describe('DockerActionComponent', () => { // No action should be performed when no containers are provided await dockerActionComponent.executeAction(); - expect(ContainerUseCases.performAction).not.toHaveBeenCalled(); + expect(ContainerUseCases.performDockerAction).not.toHaveBeenCalled(); }); test('executeAction handles failed container retrieval', async () => { @@ -105,7 +105,7 @@ describe('DockerActionComponent', () => { // An error should be thrown if the container can't be retrieved expect(dockerActionComponent.executeAction()).resolves.toBeUndefined(); - expect(ContainerUseCases.performAction).not.toHaveBeenCalled(); + expect(ContainerUseCases.performDockerAction).not.toHaveBeenCalled(); }); test('executeAction handles failed performAction execution', async () => { diff --git a/server/src/tests/unit-tests/modules/docker/Acr.test.ts b/server/src/tests/unit-tests/modules/docker/Acr.test.ts index b729683c..54692599 100644 --- a/server/src/tests/unit-tests/modules/docker/Acr.test.ts +++ b/server/src/tests/unit-tests/modules/docker/Acr.test.ts @@ -1,5 +1,5 @@ import { describe, expect, test } from 'vitest'; -import Acr from '../../../../modules/docker/registries/providers/acr/Acr'; +import Acr from '../../../../modules/containers/registries/providers/acr/Acr'; describe('testing Acr Registry', () => { const acr = new Acr(); diff --git a/server/src/tests/unit-tests/modules/docker/Custom.test.ts b/server/src/tests/unit-tests/modules/docker/Custom.test.ts index d4b3ab88..5af8b27b 100644 --- a/server/src/tests/unit-tests/modules/docker/Custom.test.ts +++ b/server/src/tests/unit-tests/modules/docker/Custom.test.ts @@ -1,5 +1,5 @@ import { describe, expect, test } from 'vitest'; -import Custom from '../../../../modules/docker/registries/providers/custom/Custom'; +import Custom from '../../../../modules/containers/registries/providers/custom/Custom'; describe('testing Custom Registry', () => { const custom = new Custom(); diff --git a/server/src/tests/unit-tests/modules/docker/Docker.test.ts b/server/src/tests/unit-tests/modules/docker/Docker.test.ts index b54ccece..9bc68df0 100644 --- a/server/src/tests/unit-tests/modules/docker/Docker.test.ts +++ b/server/src/tests/unit-tests/modules/docker/Docker.test.ts @@ -1,11 +1,11 @@ import { randomUUID } from 'node:crypto'; import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest'; import Container from '../../../../data/database/model/Container'; -import Acr from '../../../../modules/docker/registries/providers/acr/Acr'; -import Ecr from '../../../../modules/docker/registries/providers/ecr/Ecr'; -import Gcr from '../../../../modules/docker/registries/providers/gcr/Gcr'; -import Hub from '../../../../modules/docker/registries/providers/hub/Hub'; -import Docker from '../../../../modules/docker/watchers/providers/docker/Docker'; +import Acr from '../../../../modules/containers/registries/providers/acr/Acr'; +import Ecr from '../../../../modules/containers/registries/providers/ecr/Ecr'; +import Gcr from '../../../../modules/containers/registries/providers/gcr/Gcr'; +import Hub from '../../../../modules/containers/registries/providers/hub/Hub'; +import Docker from '../../../../modules/containers/watchers/providers/docker/Docker'; import sampleSemver from './samples/semver.json'; let docker: Docker; diff --git a/server/src/tests/unit-tests/modules/docker/Ecr.test.ts b/server/src/tests/unit-tests/modules/docker/Ecr.test.ts index 7cd2a864..2dea759e 100644 --- a/server/src/tests/unit-tests/modules/docker/Ecr.test.ts +++ b/server/src/tests/unit-tests/modules/docker/Ecr.test.ts @@ -1,5 +1,5 @@ import { afterEach, describe, expect, test, vi } from 'vitest'; -import Ecr from '../../../../modules/docker/registries/providers/ecr/Ecr'; +import Ecr from '../../../../modules/containers/registries/providers/ecr/Ecr'; describe('testing ECR Registry', () => { const ecr = new Ecr(); diff --git a/server/src/tests/unit-tests/modules/docker/Forjejo.test.ts b/server/src/tests/unit-tests/modules/docker/Forjejo.test.ts index 66a02bcb..c5a0ceef 100644 --- a/server/src/tests/unit-tests/modules/docker/Forjejo.test.ts +++ b/server/src/tests/unit-tests/modules/docker/Forjejo.test.ts @@ -1,5 +1,5 @@ import { describe, expect, test } from 'vitest'; -import Forgejo from '../../../../modules/docker/registries/providers/forgejo/Forgejo'; +import Forgejo from '../../../../modules/containers/registries/providers/forgejo/Forgejo'; describe('testing Forjejo Registry', () => { const forgejo = new Forgejo(); diff --git a/server/src/tests/unit-tests/modules/docker/Gcr.test.ts b/server/src/tests/unit-tests/modules/docker/Gcr.test.ts index fbd32963..ddea7774 100644 --- a/server/src/tests/unit-tests/modules/docker/Gcr.test.ts +++ b/server/src/tests/unit-tests/modules/docker/Gcr.test.ts @@ -1,5 +1,5 @@ import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest'; -import Gcr from '../../../../modules/docker/registries/providers/gcr/Gcr'; +import Gcr from '../../../../modules/containers/registries/providers/gcr/Gcr'; describe('testing GCR Registry', () => { const gcr = new Gcr(); diff --git a/server/src/tests/unit-tests/modules/docker/Ghcr.test.ts b/server/src/tests/unit-tests/modules/docker/Ghcr.test.ts index 96f292b5..61e75a36 100644 --- a/server/src/tests/unit-tests/modules/docker/Ghcr.test.ts +++ b/server/src/tests/unit-tests/modules/docker/Ghcr.test.ts @@ -1,5 +1,5 @@ import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest'; -import Ghcr from '../../../../modules/docker/registries/providers/ghcr/Ghcr'; +import Ghcr from '../../../../modules/containers/registries/providers/ghcr/Ghcr'; describe('testing GHCR Registry', () => { const ghcr = new Ghcr(); diff --git a/server/src/tests/unit-tests/modules/docker/Gitea.test.ts b/server/src/tests/unit-tests/modules/docker/Gitea.test.ts index 7d06af83..0c563d5c 100644 --- a/server/src/tests/unit-tests/modules/docker/Gitea.test.ts +++ b/server/src/tests/unit-tests/modules/docker/Gitea.test.ts @@ -1,5 +1,5 @@ import { describe, expect, test } from 'vitest'; -import Gitea from '../../../../modules/docker/registries/providers/gitea/Gitea'; +import Gitea from '../../../../modules/containers/registries/providers/gitea/Gitea'; describe('testing Gitea Registry', () => { const gitea = new Gitea(); diff --git a/server/src/tests/unit-tests/modules/docker/Gitlab.test.ts b/server/src/tests/unit-tests/modules/docker/Gitlab.test.ts index 06b16928..55ed32c0 100644 --- a/server/src/tests/unit-tests/modules/docker/Gitlab.test.ts +++ b/server/src/tests/unit-tests/modules/docker/Gitlab.test.ts @@ -1,5 +1,5 @@ import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest'; -import Gitlab from '../../../../modules/docker/registries/providers/gitlab/Gitlab'; +import Gitlab from '../../../../modules/containers/registries/providers/gitlab/Gitlab'; describe('testing Gitlab Registry', () => { const gitlab = new Gitlab(); diff --git a/server/src/tests/unit-tests/modules/docker/Hub.test.ts b/server/src/tests/unit-tests/modules/docker/Hub.test.ts index 3f357084..e7e34660 100644 --- a/server/src/tests/unit-tests/modules/docker/Hub.test.ts +++ b/server/src/tests/unit-tests/modules/docker/Hub.test.ts @@ -1,5 +1,5 @@ import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest'; -import Hub from '../../../../modules/docker/registries/providers/hub/Hub'; +import Hub from '../../../../modules/containers/registries/providers/hub/Hub'; describe('testing Hub Registry', () => { const hub = new Hub(); diff --git a/server/src/tests/unit-tests/modules/docker/Lscr.test.ts b/server/src/tests/unit-tests/modules/docker/Lscr.test.ts index 1875bfd6..4ac7501f 100644 --- a/server/src/tests/unit-tests/modules/docker/Lscr.test.ts +++ b/server/src/tests/unit-tests/modules/docker/Lscr.test.ts @@ -1,5 +1,5 @@ import { describe, expect, test } from 'vitest'; -import Lscr from '../../../../modules/docker/registries/providers/lscr/Lscr'; +import Lscr from '../../../../modules/containers/registries/providers/lscr/Lscr'; describe('testing Lscr Registry', () => { const lscr = new Lscr(); diff --git a/server/src/tests/unit-tests/modules/docker/Quay.test.ts b/server/src/tests/unit-tests/modules/docker/Quay.test.ts index a0c15693..d8e7a627 100644 --- a/server/src/tests/unit-tests/modules/docker/Quay.test.ts +++ b/server/src/tests/unit-tests/modules/docker/Quay.test.ts @@ -1,5 +1,5 @@ import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest'; -import Quay from '../../../../modules/docker/registries/providers/quay/Quay'; +import Quay from '../../../../modules/containers/registries/providers/quay/Quay'; describe('testing Quay Registry', () => { const quay = new Quay(); diff --git a/server/src/tests/unit-tests/modules/docker/tag.test.ts b/server/src/tests/unit-tests/modules/docker/tag.test.ts index e07228ad..5098840f 100644 --- a/server/src/tests/unit-tests/modules/docker/tag.test.ts +++ b/server/src/tests/unit-tests/modules/docker/tag.test.ts @@ -1,5 +1,5 @@ import { describe, expect, test } from 'vitest'; -import tag from '../../../../modules/docker/utils/tag'; +import tag from '../../../../modules/containers/utils/tag'; describe('testing tag', () => { const parseTestCases = [