taler-deployment

Deployment scripts and configuration files
Log | Files | Refs | README

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

Configure more instances.

Diffstat:
Mbin/taler-config-instances | 20++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)

diff --git 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] )