From 96297536b789b969eb3474fa350492d69726d896 Mon Sep 17 00:00:00 2001 From: Grzegorz Godlewski Date: Wed, 20 Dec 2023 15:30:50 +0100 Subject: [PATCH] chore: removed redundant E2E test, as the case is covered in unit tests --- tests/e2e/strategies.spec.ts | 41 ------------------------------------ 1 file changed, 41 deletions(-) diff --git a/tests/e2e/strategies.spec.ts b/tests/e2e/strategies.spec.ts index baa49ed31..431664f7a 100644 --- a/tests/e2e/strategies.spec.ts +++ b/tests/e2e/strategies.spec.ts @@ -52,45 +52,4 @@ describe("Strategies", function () { await executor.shutdown(); }); }); - describe("Payments", () => { - it("should only accept invoices below 0.00001 GLM", async () => { - const executor = await TaskExecutor.create({ - package: "golem/alpine:latest", - invoiceFilter: PaymentFilters.acceptMaxAmountInvoiceFilter(0.00001), - logger, - }); - const data = ["one", "two"]; - const futureResults = data.map((x) => - executor.run(async (ctx) => { - const res = await ctx.run(`echo "${x}"`); - return res.stdout?.toString().trim(); - }), - ); - const finalOutputs = (await Promise.all(futureResults)).filter((x) => !!x); - - expect(finalOutputs).toEqual(expect.arrayContaining(data)); - await executor.shutdown(); - await logger.expectToMatch(/Invoice .* for agreement .* rejected by Invoice Filter/, 100); - }); - - it("should only accept debit notes below 0.00001 GLM", async () => { - const executor = await TaskExecutor.create({ - package: "golem/alpine:latest", - debitNotesFilter: PaymentFilters.acceptMaxAmountDebitNoteFilter(0.00001), - logger, - }); - const data = ["one", "two"]; - const futureResults = data.map((x) => - executor.run(async (ctx) => { - const res = await ctx.run(`echo "${x}"`); - return res.stdout?.toString().trim(); - }), - ); - const finalOutputs = (await Promise.all(futureResults)).filter((x) => !!x); - - expect(finalOutputs).toEqual(expect.arrayContaining(data)); - await executor.shutdown(); - await logger.expectToMatch(/DebitNote .* for agreement .* rejected by DebitNote Filter/, 100); - }); - }); });