Skip to content

Commit

Permalink
fix(tests): Fix integration tests (#136)
Browse files Browse the repository at this point in the history
* Add provider registration flags

* Add provider deal deployment flags

* Add print

* Remove print
  • Loading branch information
InversionSpaces authored Dec 4, 2023
1 parent 91c4018 commit 405ccd3
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
28 changes: 26 additions & 2 deletions test/fRPC.integration-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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")) {
Expand Down Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion test/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export class Gateway {
} else {
resolve();
}
})
}),
);
}
return this.gateway.kill();
Expand Down

0 comments on commit 405ccd3

Please sign in to comment.