Skip to content

Commit

Permalink
fixing github action script
Browse files Browse the repository at this point in the history
  • Loading branch information
drmarro committed Feb 7, 2024
1 parent 2571ff0 commit 0b0b9c3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/code-review.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions src/deduplication/__tests__/algorithm.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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),
Expand All @@ -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),
Expand All @@ -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"))
Expand Down

0 comments on commit 0b0b9c3

Please sign in to comment.