From 0b0b9c3a9fdd7fd27b989e681d7f82d4124c46b6 Mon Sep 17 00:00:00 2001 From: Davide Marro Date: Wed, 7 Feb 2024 16:37:02 +0100 Subject: [PATCH] fixing github action script --- .github/workflows/code-review.yaml | 2 +- src/deduplication/__tests__/algorithm.test.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/code-review.yaml b/.github/workflows/code-review.yaml index cc52782..d83375f 100644 --- a/.github/workflows/code-review.yaml +++ b/.github/workflows/code-review.yaml @@ -59,7 +59,7 @@ jobs: docker-compose -f "__integrations__/docker-compose.yml" down - name: Start containers - run: docker-compose --env-path "__integrations__/environments/.env" -f "__integrations__/docker-compose.yml" up -d + run: docker-compose --env-file "__integrations__/environments/.env" -f "__integrations__/docker-compose.yml" up -d - name: Sleep run: sleep 30s diff --git a/src/deduplication/__tests__/algorithm.test.ts b/src/deduplication/__tests__/algorithm.test.ts index b2846d2..7c75d37 100644 --- a/src/deduplication/__tests__/algorithm.test.ts +++ b/src/deduplication/__tests__/algorithm.test.ts @@ -15,7 +15,7 @@ const mockService: IOutputDeduplicationService = { insert: mockInsert, update: mockUpdate }; -const elasticNode = "http://localhost:9200"; + const indexName = "test_index"; const document: IOutputDocument = { id: "123", @@ -75,7 +75,7 @@ describe("timestampDeduplication", () => { it("timestampDeduplication should do nothing while retrieving a document with a greater timestamp", async () => { mockGet.mockImplementationOnce(() => - TE.right(({ fields: { _timestamp: 123 } } as unknown) as GetResponse) + TE.right(({ _source: { _timestamp: 123 } } as unknown) as GetResponse) ); await pipe( timestampDeduplication(indexName, document)(mockService), @@ -96,7 +96,7 @@ describe("timestampDeduplication", () => { it("timestampDeduplication should update index while retrieving a document with a lower timestamp", async () => { mockGet.mockImplementationOnce(() => - TE.right(({ fields: { _timestamp: 1 } } as unknown) as GetResponse) + TE.right(({ _source: { _timestamp: 1 } } as unknown) as GetResponse) ); await pipe( timestampDeduplication(indexName, document)(mockService), @@ -116,7 +116,7 @@ describe("timestampDeduplication", () => { }); it("timestampDeduplication should return an error when an error occurs", async () => { mockGet.mockImplementationOnce(() => - TE.right(({ fields: { _timestamp: 1 } } as unknown) as GetResponse) + TE.right(({ _source: { _timestamp: 1 } } as unknown) as GetResponse) ); mockUpdate.mockImplementationOnce(() => TE.left(new Error("Error during update"))