gnunet-svn
[Top][All Lists]
Advanced

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

[taler-deployment] 01/02: Configure more instances.


From: gnunet
Subject: [taler-deployment] 01/02: Configure more instances.
Date: Wed, 22 Jul 2020 17:37:05 +0200

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

ms pushed a commit to branch master
in repository deployment.

commit 4720e7ffdf1e4b3831d1aa30af21416d40ee28bb
Author: MS <ms@taler.net>
AuthorDate: Wed Jul 22 17:36:17 2020 +0200

    Configure more instances.
---
 bin/taler-config-instances | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/bin/taler-config-instances b/bin/taler-config-instances
index cf1e708..cc86243 100755
--- a/bin/taler-config-instances
+++ b/bin/taler-config-instances
@@ -12,8 +12,8 @@ if not MERCHANT_BACKEND_BASE_URL:
 
 INSTANCE_CONFIG_URL = urljoin(MERCHANT_BACKEND_BASE_URL, "/private/instances")
 
-def expectResponse(response, expected_status_code):
-    if response.status_code != expected_status_code:
+def expectResponse(response, expected_status_codes):
+    if response.status_code not in expected_status_codes:
         print("Configuration failed on URL: {}".format(response.url))
         print(response.text)
         exit(1)
@@ -35,7 +35,7 @@ blog_config = dict(
 )
 
 print("configuring Donations")
-blog_config = dict(
+donations_config = dict(
     payto_uris=["payto://x-taler-bank/"],
     id="donations",
     name="Donations",
@@ -49,7 +49,7 @@ blog_config = dict(
 )
 
 print("configuring Survey")
-blog_config = dict(
+survey_config = dict(
     payto_uris=["payto://x-taler-bank/"],
     id="survey",
     name="Survey",
@@ -62,9 +62,17 @@ blog_config = dict(
     default_pay_delay=dict(d_ms="forever")
 )
 
+expectResponse(
+    post(INSTANCE_CONFIG_URL, json=blog_config, headers={"Authorization": 
"ApiKey sandbox"}),
+    [204, 409]
+)
 
+expectResponse(
+    post(INSTANCE_CONFIG_URL, json=donations_config, headers={"Authorization": 
"ApiKey sandbox"}),
+    [204, 409]
+)
 
 expectResponse(
-    post(INSTANCE_CONFIG_URL, json=blog_config, headers={"Authorization": 
"ApiKey sandbox"}),
-    204
+    post(INSTANCE_CONFIG_URL, json=survey_config, headers={"Authorization": 
"ApiKey sandbox"}),
+    [204, 409]
 )

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