diff options
Diffstat (limited to 'packages/taler-wallet-cli/src/integrationtests')
-rw-r--r-- | packages/taler-wallet-cli/src/integrationtests/harness.ts | 17 | ||||
-rw-r--r-- | packages/taler-wallet-cli/src/integrationtests/test-wallet-backup-basic.ts | 9 |
2 files changed, 23 insertions, 3 deletions
diff --git a/packages/taler-wallet-cli/src/integrationtests/harness.ts b/packages/taler-wallet-cli/src/integrationtests/harness.ts index 2b26ef7fc..835eb7a08 100644 --- a/packages/taler-wallet-cli/src/integrationtests/harness.ts +++ b/packages/taler-wallet-cli/src/integrationtests/harness.ts @@ -99,7 +99,10 @@ import { import { ApplyRefundResponse } from "@gnu-taler/taler-wallet-core"; import { PendingOperationsResponse } from "@gnu-taler/taler-wallet-core"; import { CoinConfig } from "./denomStructures"; -import { AddBackupProviderRequest, BackupInfo } from "@gnu-taler/taler-wallet-core/src/operations/backup"; +import { + AddBackupProviderRequest, + BackupInfo, +} from "@gnu-taler/taler-wallet-core/src/operations/backup"; const exec = util.promisify(require("child_process").exec); @@ -1474,7 +1477,9 @@ export class MerchantService implements MerchantServiceInterface { config.write(this.configFilename); } - async addInstance(instanceConfig: PartialMerchantInstanceConfig): Promise<void> { + async addInstance( + instanceConfig: PartialMerchantInstanceConfig, + ): Promise<void> { if (!this.proc) { throw Error("merchant must be running to add instance"); } @@ -1881,4 +1886,12 @@ export class WalletCli { } throw new OperationFailedError(resp.error); } + + async runBackupCycle(): Promise<void> { + const resp = await this.apiRequest("runBackupCycle", {}); + if (resp.type === "response") { + return; + } + throw new OperationFailedError(resp.error); + } } diff --git a/packages/taler-wallet-cli/src/integrationtests/test-wallet-backup-basic.ts b/packages/taler-wallet-cli/src/integrationtests/test-wallet-backup-basic.ts index 9201c558c..9804f7ab2 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-wallet-backup-basic.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-wallet-backup-basic.ts @@ -56,11 +56,18 @@ export async function runWalletBackupBasicTest(t: GlobalTestState) { await wallet.addBackupProvider({ backupProviderBaseUrl: sync.baseUrl, - activate: false, + activate: true, }); { const bi = await wallet.getBackupInfo(); t.assertDeepEqual(bi.providers[0].active, true); } + + await wallet.runBackupCycle(); + + { + const bi = await wallet.getBackupInfo(); + console.log(bi); + } } |