gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-wallet-core] branch master updated: prettify code


From: gnunet
Subject: [taler-wallet-core] branch master updated: prettify code
Date: Mon, 01 Feb 2021 13:38:19 +0100

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository wallet-core.

The following commit(s) were added to refs/heads/master by this push:
     new 69aaaefc prettify code
69aaaefc is described below

commit 69aaaefce30331bf40141e33d0e0aeae40708443
Author: MS <ms@taler.net>
AuthorDate: Mon Feb 1 13:38:15 2021 +0100

    prettify code
---
 .../src/integrationtests/harness.ts                | 14 +++--
 .../src/integrationtests/libeufin.ts               | 73 ++++++++--------------
 2 files changed, 34 insertions(+), 53 deletions(-)

diff --git a/packages/taler-wallet-cli/src/integrationtests/harness.ts 
b/packages/taler-wallet-cli/src/integrationtests/harness.ts
index 3a56f4cd..396a0d34 100644
--- a/packages/taler-wallet-cli/src/integrationtests/harness.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/harness.ts
@@ -116,8 +116,10 @@ interface WaitResult {
  * Returns a new object being the current environment
  * plus the values given in the parameter.
  */
-export function extendEnv(extension: {[index: string]: string}): {[index: 
string]: string | undefined} {
-  let ret: {[index: string]: string | undefined} = {};
+export function extendEnv(extension: {
+  [index: string]: string;
+}): { [index: string]: string | undefined } {
+  let ret: { [index: string]: string | undefined } = {};
   for (let v in process.env) {
     ret[v] = process.env[v];
   }
@@ -190,7 +192,7 @@ export async function runCommand(
   logName: string,
   command: string,
   args: string[],
-  env: {[index: string]: string | undefined} = process.env
+  env: { [index: string]: string | undefined } = process.env,
 ): Promise<string> {
   console.log("runing command", shellescape([command, ...args]));
   return new Promise((resolve, reject) => {
@@ -198,7 +200,7 @@ export async function runCommand(
     const proc = spawn(command, args, {
       stdio: ["inherit", "pipe", "pipe"],
       shell: false,
-      env: env
+      env: env,
     });
     proc.stdout.on("data", (x) => {
       if (x instanceof Buffer) {
@@ -340,14 +342,14 @@ export class GlobalTestState {
     command: string,
     args: string[],
     logName: string,
-    env: {[index: string] : string | undefined} = process.env
+    env: { [index: string]: string | undefined } = process.env,
   ): ProcessWrapper {
     console.log(
       `spawning process (${logName}): ${shellescape([command, ...args])}`,
     );
     const proc = spawn(command, args, {
       stdio: ["inherit", "pipe", "pipe"],
-      env: env
+      env: env,
     });
     console.log(`spawned process (${logName}) with pid ${proc.pid}`);
     proc.on("error", (err) => {
diff --git a/packages/taler-wallet-cli/src/integrationtests/libeufin.ts 
b/packages/taler-wallet-cli/src/integrationtests/libeufin.ts
index b4208801..0e6fcfef 100644
--- a/packages/taler-wallet-cli/src/integrationtests/libeufin.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/libeufin.ts
@@ -24,7 +24,7 @@ import {
   pingProc,
   ProcessWrapper,
   runCommand,
-  extendEnv
+  extendEnv,
 } from "./harness";
 
 export interface LibeufinSandboxServiceInterface {
@@ -70,13 +70,11 @@ export class LibeufinSandboxService implements 
LibeufinSandboxServiceInterface {
   async start(): Promise<void> {
     this.sandboxProc = this.globalTestState.spawnService(
       "libeufin-sandbox",
-      [
-        "serve",
-        "--port",
-        `${this.sandboxConfig.httpPort}`
-      ],
+      ["serve", "--port", `${this.sandboxConfig.httpPort}`],
       "libeufin-sandbox",
-      extendEnv({LIBEUFIN_SANDBOX_DB_CONNECTION: 
this.sandboxConfig.databaseJdbcUri})
+      extendEnv({
+        LIBEUFIN_SANDBOX_DB_CONNECTION: this.sandboxConfig.databaseJdbcUri,
+      }),
     );
   }
 
@@ -110,24 +108,19 @@ export class LibeufinNexusService {
       this.globalTestState,
       "libeufin-nexus-superuser",
       "libeufin-nexus",
-      [
-        "superuser",
-        "admin",
-        "--password",
-        "test"
-      ],
-      extendEnv({LIBEUFIN_NEXUS_DB_CONNECTION: 
this.nexusConfig.databaseJdbcUri})
+      ["superuser", "admin", "--password", "test"],
+      extendEnv({
+        LIBEUFIN_NEXUS_DB_CONNECTION: this.nexusConfig.databaseJdbcUri,
+      }),
     );
 
     this.nexusProc = this.globalTestState.spawnService(
       "libeufin-nexus",
-      [
-        "serve",
-        "--port",
-        `${this.nexusConfig.httpPort}`,
-      ],
+      ["serve", "--port", `${this.nexusConfig.httpPort}`],
       "libeufin-nexus",
-      extendEnv({LIBEUFIN_NEXUS_DB_CONNECTION: 
this.nexusConfig.databaseJdbcUri})
+      extendEnv({
+        LIBEUFIN_NEXUS_DB_CONNECTION: this.nexusConfig.databaseJdbcUri,
+      }),
     );
   }
 
@@ -284,7 +277,7 @@ export interface PostNexusPermissionRequest {
     resourceType: string;
     resourceId: string;
     permissionName: string;
-  }
+  };
 }
 
 export namespace LibeufinNexusApi {
@@ -411,20 +404,13 @@ export namespace LibeufinNexusApi {
     req: CreateNexusUserRequest,
   ) {
     const baseUrl = libeufinNexusService.baseUrl;
-    let url = new URL(
-      `/users`,
-      baseUrl,
-    );
-    await axios.post(
-      url.href,
-      req,
-      {
-        auth: {
-          username: "admin",
-          password: "test",
-        },
+    let url = new URL(`/users`, baseUrl);
+    await axios.post(url.href, req, {
+      auth: {
+        username: "admin",
+        password: "test",
       },
-    );
+    });
   }
 
   export async function postPermission(
@@ -432,20 +418,13 @@ export namespace LibeufinNexusApi {
     req: PostNexusPermissionRequest,
   ) {
     const baseUrl = libeufinNexusService.baseUrl;
-    let url = new URL(
-      `/permissions`,
-      baseUrl,
-    );
-    await axios.post(
-      url.href,
-      req,
-      {
-        auth: {
-          username: "admin",
-          password: "test",
-        },
+    let url = new URL(`/permissions`, baseUrl);
+    await axios.post(url.href, req, {
+      auth: {
+        username: "admin",
+        password: "test",
       },
-    );
+    });
   }
 
   export async function createTwgFacade(

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]