wallet: add 'env-full' test environment with merchant
This commit is contained in:
parent
a1c5f00aed
commit
0c19050ae7
@ -68,6 +68,7 @@ import { runEnv1 } from "./env1.js";
|
||||
import { GlobalTestState, runTestWithState } from "./harness/harness.js";
|
||||
import { getTestInfo, runTests } from "./integrationtests/testrunner.js";
|
||||
import { lintExchangeDeployment } from "./lint.js";
|
||||
import { runEnvFull } from "./env-full.js";
|
||||
// @ts-ignore
|
||||
global.TextEncoder = TextEncoder;
|
||||
// @ts-ignore
|
||||
@ -909,6 +910,18 @@ advancedCli
|
||||
await runBench3(config);
|
||||
});
|
||||
|
||||
advancedCli
|
||||
.subcommand("envFull", "env-full", {
|
||||
help: "Run a test environment for bench1",
|
||||
})
|
||||
.action(async (args) => {
|
||||
const testDir = fs.mkdtempSync(path.join(os.tmpdir(), "taler-env-full-"));
|
||||
const testState = new GlobalTestState({
|
||||
testDir,
|
||||
});
|
||||
await runTestWithState(testState, runEnvFull, "env-full", true);
|
||||
});
|
||||
|
||||
advancedCli
|
||||
.subcommand("env1", "env1", {
|
||||
help: "Run a test environment for bench1",
|
||||
|
@ -422,5 +422,23 @@ export async function testWithGv() {
|
||||
});
|
||||
}
|
||||
|
||||
export async function testWithLocal() {
|
||||
const w = await getWallet();
|
||||
await w.wallet.client.call(WalletApiOperation.InitWallet, {});
|
||||
await w.wallet.client.call(WalletApiOperation.RunIntegrationTest, {
|
||||
amountToSpend: "TESTKUDOS:1",
|
||||
amountToWithdraw: "TESTKUDOS:3",
|
||||
bankBaseUrl: "http://localhost:8082/",
|
||||
bankAccessApiBaseUrl: "http://localhost:8082/taler-bank-access/",
|
||||
exchangeBaseUrl: "http://localhost:8081/",
|
||||
merchantBaseUrl: "http://backend.demo.taler.net:8083/",
|
||||
});
|
||||
await w.wallet.runTaskLoop({
|
||||
stopWhenDone: true,
|
||||
});
|
||||
}
|
||||
|
||||
// @ts-ignore
|
||||
globalThis.testWithGv = testWithGv;
|
||||
// @ts-ignore
|
||||
globalThis.testWithLocal = testWithLocal;
|
||||
|
Loading…
Reference in New Issue
Block a user