Skip to content

Commit

Permalink
Merge pull request #737 from golemfactory/remove-redundant-e2e-test
Browse files Browse the repository at this point in the history
chore: removed redundant E2E test, as the case is covered in unit tests
  • Loading branch information
grisha87 authored Dec 20, 2023
2 parents 5d68a53 + 9629753 commit 9c218b4
Showing 1 changed file with 0 additions and 41 deletions.
41 changes: 0 additions & 41 deletions tests/e2e/strategies.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
});
});

0 comments on commit 9c218b4

Please sign in to comment.