gnunet-svn
[Top][All Lists]
Advanced

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

[taler-grid5k] 60/141: fix rsyslog config and logger messages for wallet


From: gnunet
Subject: [taler-grid5k] 60/141: fix rsyslog config and logger messages for wallet
Date: Thu, 18 Nov 2021 14:50:01 +0100

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

marco-boss pushed a commit to branch master
in repository grid5k.

commit f93d251720d813ae55ed76b0c43b28ca133b8c2e
Author: Boss Marco <bossm8@bfh.ch>
AuthorDate: Wed Oct 20 12:04:43 2021 +0200

    fix rsyslog config and logger messages for wallet
---
 configs/etc/rsyslog.d/taler.conf |  2 +-
 experiment/scripts/test.sh       | 39 +++++++++++++++++++++++++++++++++------
 2 files changed, 34 insertions(+), 7 deletions(-)

diff --git a/configs/etc/rsyslog.d/taler.conf b/configs/etc/rsyslog.d/taler.conf
index fa2e47f..62bc209 100644
--- a/configs/etc/rsyslog.d/taler.conf
+++ b/configs/etc/rsyslog.d/taler.conf
@@ -1,7 +1,7 @@
 module(load="omprog")
 # Need to load due to parser error https://github.com/grafana/loki/issues/1783
 module(load="mmutf8fix")
-if ($programname startswith 'taler' or $syslogtag startswith 'nginx' then) {
+if ($programname startswith 'taler' or $syslogtag startswith 'nginx') then {
   action(type="mmutf8fix" replacementChar="?")
 # 
https://grafana.com/docs/loki/latest/clients/promtail/scraping/#rsyslog-output-configuration
   action(type="omfwd"
diff --git a/experiment/scripts/test.sh b/experiment/scripts/test.sh
index c3efa0c..f8b45e1 100755
--- a/experiment/scripts/test.sh
+++ b/experiment/scripts/test.sh
@@ -2,27 +2,54 @@
 
 DB_FILE=~/walletdb/wallet."${1}".json
 
+function log() {
+  logger --tcp \
+         --port 1514 \
+         --server ${MONITOR_DOMAIN} \
+         --tag taler-wallet \
+         --id \
+         "$1"
+}
+
 for i in {0..10000};
 do
 
-  taler-wallet-cli \
+  if taler-wallet-cli \
       --wallet-db="${DB_FILE}" \
       advanced withdraw-fakebank \
         --exchange "http://${PROXY_DOMAIN}/"; \
         --bank "http://${BANK_DOMAIN}/"; \
-        --amount KUDOS:1000 \
+        --amount KUDOS:1000;
+  then
+    log "reserved KUDOS:1000"
+  else
+    log "failed to reserve KUDOS"
+    continue
+  fi
 
-  taler-wallet-cli \
+  if taler-wallet-cli \
       --wallet-db="${DB_FILE}" \
       run-until-done \
-        --max-retries=5 \
+        --max-retries=10;
+  then
+    log "retrieved all reserved KUDOS"
+  else 
+    log "failed to retrieve KUDOS"
+    continue
+  fi
 
   for i in {1..10};
   do
-    taler-wallet-cli \
+    if taler-wallet-cli \
         --wallet-db="${DB_FILE}" \
        deposit create KUDOS:100 \
-        "payto://x-taler-bank/${BANK_DOMAIN}/Exchange"
+        "payto://x-taler-bank/${BANK_DOMAIN}/Exchange";
+    then
+      log "paid KUDOS:100 to bank"
+    else 
+      log "failed to pay KUDOS:100"
+      continue
+    fi
   done
 
 done

-- 
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]