From 405ccd38f4231ac9d670ccc3eed8e333533d606c Mon Sep 17 00:00:00 2001 From: InversionSpaces Date: Mon, 4 Dec 2023 19:52:24 +0100 Subject: [PATCH] fix(tests): Fix integration tests (#136) * Add provider registration flags * Add provider deal deployment flags * Add print * Remove print --- test/fRPC.integration-test.ts | 28 ++++++++++++++++++++++++++-- test/utils.ts | 2 +- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/test/fRPC.integration-test.ts b/test/fRPC.integration-test.ts index e8d9747..fbf2ee1 100644 --- a/test/fRPC.integration-test.ts +++ b/test/fRPC.integration-test.ts @@ -126,7 +126,16 @@ describe("fRPC", () => { if (FLUENCE_ENV !== "local") return; - const [register, stderrReg] = await fluenceKeyEnv("provider", "register"); + const [register, stderrReg] = await fluenceKeyEnv( + "provider", + "register", + // TODO: Those values are moved + // to provider config in newer cli version + "--max-collateral", + "100", + "--price-per-epoch", + "1", + ); // Here CLI writes success to stdout if (!register.includes("Successfully")) { @@ -160,7 +169,22 @@ describe("fRPC", () => { // Remove previous deployment info await backupFile(".fluence/workers.yaml"); - const [stdout, stderr] = await fluenceKeyEnv("deal", "deploy"); + const [stdout, stderr] = await fluenceKeyEnv( + "deal", + "deploy", + // TODO: Those values are moved + // to deals in fluence config in newer cli version + "--collateral-per-worker", + "1", + "--max-workers-per-provider", + "3", + "--min-workers", + "3", + "--target-workers", + "3", + "--price-per-worker-epoch", + "1", + ); expect(stdout.includes("Success!")).toBeTruthy(); diff --git a/test/utils.ts b/test/utils.ts index 6c5ae19..188c312 100644 --- a/test/utils.ts +++ b/test/utils.ts @@ -113,7 +113,7 @@ export class Gateway { } else { resolve(); } - }) + }), ); } return this.gateway.kill();