merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit 705064978a7297965c55cc8582c1b40f69827bab
parent a81278253f05d99d95b1b7732991e80476cfbd90
Author: Christian Grothoff <christian@grothoff.org>
Date:   Thu,  8 Dec 2022 14:20:49 +0100

Merge branch 'master' of git+ssh://git.taler.net/merchant

Diffstat:
Msrc/backend/taler-merchant-httpd.c | 187+++++++++++++++++++++++++++++++++++++++----------------------------------------
Msrc/backenddb/plugin_merchantdb_postgres.c | 2+-
Msrc/lib/merchant_api_post_templates.c | 4----
Dsrc/testing/#Makefile# | 1699-------------------------------------------------------------------------------
Asrc/testing/#testing_api_cmd_post_products.c# | 332+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msrc/testing/test_merchant_api.c | 76++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dsrc/testing/test_merchant_template_creation.sh | 0
Msrc/testing/testing_api_cmd_post_templates.c | 7++++---
8 files changed, 505 insertions(+), 1802 deletions(-)

diff --git a/src/backend/taler-merchant-httpd.c b/src/backend/taler-merchant-httpd.c @@ -931,6 +931,98 @@ url_handler (void *cls, .allow_deleted_instance = true, .handler = &TMH_private_get_transfers }, + /* POST /templates: */ + { + .url_prefix = "/templates", + .method = MHD_HTTP_METHOD_POST, + .handler = &TMH_private_post_templates, + /* allow template data of up to 8 MB, that should be plenty; + note that exceeding #GNUNET_MAX_MALLOC_CHECKED (40 MB) + would require further changes to the allocation logic + in the code... */ + .max_upload = 1024 * 1024 * 8 + }, + /* GET /templates: */ + { + .url_prefix = "/templates", + .method = MHD_HTTP_METHOD_GET, + .handler = &TMH_private_get_templates + }, + /* GET /templates/$ID/: */ + { + .url_prefix = "/templates/", + .method = MHD_HTTP_METHOD_GET, + .have_id_segment = true, + .allow_deleted_instance = true, + .handler = &TMH_private_get_templates_ID + }, + /* DELETE /templates/$ID/: */ + { + .url_prefix = "/templates/", + .method = MHD_HTTP_METHOD_DELETE, + .have_id_segment = true, + .allow_deleted_instance = true, + .handler = &TMH_private_delete_templates_ID + }, + /* PATCH /templates/$ID/: */ + { + .url_prefix = "/templates/", + .method = MHD_HTTP_METHOD_PATCH, + .have_id_segment = true, + .allow_deleted_instance = true, + .handler = &TMH_private_patch_templates_ID, + /* allow template data of up to 8 MB, that should be plenty; + note that exceeding #GNUNET_MAX_MALLOC_CHECKED (40 MB) + would require further changes to the allocation logic + in the code... */ + .max_upload = 1024 * 1024 * 8 + }, + /* GET /webhooks: */ + { + .url_prefix = "/webhooks", + .method = MHD_HTTP_METHOD_GET, + .handler = &TMH_private_get_webhooks + }, + /* POST /webhooks: */ + { + .url_prefix = "/webhooks", + .method = MHD_HTTP_METHOD_POST, + .handler = &TMH_private_post_webhooks, + /* allow webhook data of up to 8 MB, that should be plenty; + note that exceeding #GNUNET_MAX_MALLOC_CHECKED (40 MB) + would require further changes to the allocation logic + in the code... */ + .max_upload = 1024 * 1024 * 8 + }, + /* GET /webhooks/$ID/: */ + { + .url_prefix = "/webhooks/", + .method = MHD_HTTP_METHOD_GET, + .have_id_segment = true, + .allow_deleted_instance = true, + .handler = &TMH_private_get_webhooks_ID + }, + /* DELETE /webhooks/$ID/: */ + { + .url_prefix = "/webhooks/", + .method = MHD_HTTP_METHOD_DELETE, + .have_id_segment = true, + .allow_deleted_instance = true, + .handler = &TMH_private_delete_webhooks_ID + }, + /* PATCH /webhooks/$ID/: */ + { + .url_prefix = "/webhooks/", + .method = MHD_HTTP_METHOD_PATCH, + .have_id_segment = true, + .allow_deleted_instance = true, + .handler = &TMH_private_patch_webhooks_ID, + /* allow webhook data of up to 8 MB, that should be plenty; + note that exceeding #GNUNET_MAX_MALLOC_CHECKED (40 MB) + would require further changes to the allocation logic + in the code... */ + .max_upload = 1024 * 1024 * 8 + }, { .url_prefix = NULL } @@ -1062,101 +1154,6 @@ url_handler (void *cls, .method = MHD_HTTP_METHOD_OPTIONS, .handler = &handle_server_options }, - /* GET /templates: */ - { - .url_prefix = "/templates/", - .method = MHD_HTTP_METHOD_GET, - .handler = &TMH_private_get_templates - }, - /* POST /templates: */ - { - .url_prefix = "/templates/", - .method = MHD_HTTP_METHOD_POST, - .handler = &TMH_private_post_templates, - /* allow template data of up to 8 MB, that should be plenty; - note that exceeding #GNUNET_MAX_MALLOC_CHECKED (40 MB) - would require further changes to the allocation logic - in the code... */ - .max_upload = 1024 * 1024 * 8 - }, - /* GET /templates/$ID/: */ - { - .url_prefix = "/templates/", - .method = MHD_HTTP_METHOD_GET, - .have_id_segment = true, - .allow_deleted_instance = true, - .handler = &TMH_private_get_templates_ID - }, - /* DELETE /templates/$ID/: */ - { - .url_prefix = "/templates/", - .method = MHD_HTTP_METHOD_DELETE, - .have_id_segment = true, - .allow_deleted_instance = true, - .handler = &TMH_private_delete_templates_ID - }, - /* PATCH /templates/$ID/: */ - { - .url_prefix = "/templates/", - .method = MHD_HTTP_METHOD_PATCH, - .have_id_segment = true, - .allow_deleted_instance = true, - .handler = &TMH_private_patch_templates_ID, - /* allow template data of up to 8 MB, that should be plenty; - note that exceeding #GNUNET_MAX_MALLOC_CHECKED (40 MB) - would require further changes to the allocation logic - in the code... */ - .max_upload = 1024 * 1024 * 8 - }, - { - .url_prefix = NULL - }, - /* GET /webhooks: */ - { - .url_prefix = "/webhooks/", - .method = MHD_HTTP_METHOD_GET, - .handler = &TMH_private_get_webhooks - }, - /* POST /webhooks: */ - { - .url_prefix = "/webhooks/", - .method = MHD_HTTP_METHOD_POST, - .handler = &TMH_private_post_webhooks, - /* allow webhook data of up to 8 MB, that should be plenty; - note that exceeding #GNUNET_MAX_MALLOC_CHECKED (40 MB) - would require further changes to the allocation logic - in the code... */ - .max_upload = 1024 * 1024 * 8 - }, - /* GET /webhooks/$ID/: */ - { - .url_prefix = "/webhooks/", - .method = MHD_HTTP_METHOD_GET, - .have_id_segment = true, - .allow_deleted_instance = true, - .handler = &TMH_private_get_webhooks_ID - }, - /* DELETE /webhooks/$ID/: */ - { - .url_prefix = "/webhooks/", - .method = MHD_HTTP_METHOD_DELETE, - .have_id_segment = true, - .allow_deleted_instance = true, - .handler = &TMH_private_delete_webhooks_ID - }, - /* PATCH /webhooks/$ID/: */ - { - .url_prefix = "/webhooks/", - .method = MHD_HTTP_METHOD_PATCH, - .have_id_segment = true, - .allow_deleted_instance = true, - .handler = &TMH_private_patch_webhooks_ID, - /* allow webhook data of up to 8 MB, that should be plenty; - note that exceeding #GNUNET_MAX_MALLOC_CHECKED (40 MB) - would require further changes to the allocation logic - in the code... */ - .max_upload = 1024 * 1024 * 8 - }, { .url_prefix = NULL } diff --git a/src/backenddb/plugin_merchantdb_postgres.c b/src/backenddb/plugin_merchantdb_postgres.c @@ -9865,7 +9865,7 @@ postgres_connect (void *cls) GNUNET_PQ_make_prepare ("delete_webhook", "DELETE" " FROM merchant_webhook" - " WHERE merchant_template.merchant_serial=" + " WHERE merchant_webhook.merchant_serial=" " (SELECT merchant_serial " " FROM merchant_instances" " WHERE merchant_id=$1)" diff --git a/src/lib/merchant_api_post_templates.c b/src/lib/merchant_api_post_templates.c @@ -129,10 +129,6 @@ handle_post_templates_finished (void *cls, happen, we should pass the JSON reply to the application */ break; - case MHD_HTTP_CONFLICT: - hr.ec = TALER_JSON_get_error_code (json); - hr.hint = TALER_JSON_get_error_hint (json); - break; case MHD_HTTP_INTERNAL_SERVER_ERROR: hr.ec = TALER_JSON_get_error_code (json); hr.hint = TALER_JSON_get_error_hint (json); diff --git a/src/testing/#Makefile# b/src/testing/#Makefile# @@ -1,1699 +0,0 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. -# src/testing/Makefile. Generated from Makefile.in by configure. - -# Copyright (C) 1994-2020 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - - - - -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/taler-merchant -pkgincludedir = $(includedir)/taler-merchant -pkglibdir = $(libdir)/taler-merchant -pkglibexecdir = $(libexecdir)/taler-merchant -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = x86_64-pc-linux-gnu -host_triplet = x86_64-pc-linux-gnu -check_PROGRAMS = \ - test_merchant_api_cs$(EXEEXT) \ - test_merchant_api_rsa$(EXEEXT) \ - test_kyc_api$(EXEEXT) $(am__EXEEXT_1) -#am__append_1 = \ -# test_merchant_api_twisted_cs \ -# test_merchant_api_twisted_rsa - -subdir = src/testing -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ - $(top_srcdir)/m4/ax_lib_postgresql.m4 \ - $(top_srcdir)/m4/ax_prog_doxygen.m4 \ - $(top_srcdir)/m4/libcurl.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/mhd.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/taler_merchant_config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -#am__EXEEXT_1 = test_merchant_api_twisted_cs$(EXEEXT) \ -# test_merchant_api_twisted_rsa$(EXEEXT) -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__installdirs = "$(DESTDIR)$(libdir)" -LTLIBRARIES = $(lib_LTLIBRARIES) -am__DEPENDENCIES_1 = -libtalermerchanttesting_la_DEPENDENCIES = \ - $(top_srcdir)/src/lib/libtalermerchant.la \ - $(am__DEPENDENCIES_1) -am_libtalermerchanttesting_la_OBJECTS = testing_api_cmd_config.lo \ - testing_api_cmd_abort_order.lo testing_api_cmd_claim_order.lo \ - testing_api_cmd_get_instance.lo \ - testing_api_cmd_get_instances.lo testing_api_cmd_get_orders.lo \ - testing_api_cmd_get_product.lo testing_api_cmd_get_products.lo \ - testing_api_cmd_get_reserve.lo testing_api_cmd_get_reserves.lo \ - testing_api_cmd_get_tips.lo testing_api_cmd_get_transfers.lo \ - testing_api_cmd_get_templates.lo \ - testing_api_cmd_get_template.lo \ - testing_api_cmd_get_webhooks.lo testing_api_cmd_get_webhook.lo \ - testing_api_cmd_delete_instance.lo \ - testing_api_cmd_delete_order.lo \ - testing_api_cmd_delete_product.lo \ - testing_api_cmd_delete_template.lo \ - testing_api_cmd_delete_webhook.lo \ - testing_api_cmd_delete_reserve.lo \ - testing_api_cmd_delete_transfer.lo \ - testing_api_cmd_forget_order.lo testing_api_cmd_kyc_get.lo \ - testing_api_cmd_lock_product.lo \ - testing_api_cmd_instance_auth.lo \ - testing_api_cmd_merchant_get_order.lo \ - testing_api_cmd_merchant_get_tip.lo \ - testing_api_cmd_pay_order.lo testing_api_cmd_post_instances.lo \ - testing_api_cmd_post_orders_paid.lo \ - testing_api_cmd_post_orders.lo \ - testing_api_cmd_post_products.lo \ - testing_api_cmd_post_reserves.lo \ - testing_api_cmd_post_transfers.lo \ - testing_api_cmd_post_templates.lo \ - testing_api_cmd_post_webhooks.lo \ - testing_api_cmd_patch_instance.lo \ - testing_api_cmd_patch_product.lo \ - testing_api_cmd_patch_template.lo \ - testing_api_cmd_patch_webhook.lo \ - testing_api_cmd_refund_order.lo \ - testing_api_cmd_tip_authorize.lo testing_api_cmd_tip_pickup.lo \ - testing_api_cmd_wallet_get_order.lo \ - testing_api_cmd_wallet_get_tip.lo \ - testing_api_cmd_wallet_post_orders_refund.lo \ - testing_api_helpers.lo testing_api_traits.lo -libtalermerchanttesting_la_OBJECTS = \ - $(am_libtalermerchanttesting_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent -am__v_lt_1 = -libtalermerchanttesting_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(AM_CFLAGS) $(CFLAGS) $(libtalermerchanttesting_la_LDFLAGS) \ - $(LDFLAGS) -o $@ -am_test_kyc_api_OBJECTS = test_kyc_api.$(OBJEXT) -test_kyc_api_OBJECTS = $(am_test_kyc_api_OBJECTS) -test_kyc_api_DEPENDENCIES = libtalermerchanttesting.la \ - $(top_srcdir)/src/backenddb/libtalermerchantdb.la \ - $(top_srcdir)/src/lib/libtalermerchant.la \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -am_test_merchant_api_cs_OBJECTS = test_merchant_api.$(OBJEXT) -test_merchant_api_cs_OBJECTS = $(am_test_merchant_api_cs_OBJECTS) -test_merchant_api_cs_DEPENDENCIES = libtalermerchanttesting.la \ - $(top_srcdir)/src/backenddb/libtalermerchantdb.la \ - $(top_srcdir)/src/lib/libtalermerchant.la \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -am_test_merchant_api_rsa_OBJECTS = test_merchant_api.$(OBJEXT) -test_merchant_api_rsa_OBJECTS = $(am_test_merchant_api_rsa_OBJECTS) -test_merchant_api_rsa_DEPENDENCIES = libtalermerchanttesting.la \ - $(top_srcdir)/src/backenddb/libtalermerchantdb.la \ - $(top_srcdir)/src/lib/libtalermerchant.la \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -am_test_merchant_api_twisted_cs_OBJECTS = \ - test_merchant_api_twisted.$(OBJEXT) -test_merchant_api_twisted_cs_OBJECTS = \ - $(am_test_merchant_api_twisted_cs_OBJECTS) -test_merchant_api_twisted_cs_DEPENDENCIES = \ - $(top_srcdir)/src/backenddb/libtalermerchantdb.la \ - $(top_srcdir)/src/lib/libtalermerchant.la \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -am_test_merchant_api_twisted_rsa_OBJECTS = \ - test_merchant_api_twisted.$(OBJEXT) -test_merchant_api_twisted_rsa_OBJECTS = \ - $(am_test_merchant_api_twisted_rsa_OBJECTS) -test_merchant_api_twisted_rsa_DEPENDENCIES = \ - $(top_srcdir)/src/backenddb/libtalermerchantdb.la \ - $(top_srcdir)/src/lib/libtalermerchant.la \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -AM_V_P = $(am__v_P_$(V)) -am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I. -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__maybe_remake_depfiles = depfiles -am__depfiles_remade = ./$(DEPDIR)/test_kyc_api.Po \ - ./$(DEPDIR)/test_merchant_api.Po \ - ./$(DEPDIR)/test_merchant_api_twisted.Po \ - ./$(DEPDIR)/testing_api_cmd_abort_order.Plo \ - ./$(DEPDIR)/testing_api_cmd_claim_order.Plo \ - ./$(DEPDIR)/testing_api_cmd_config.Plo \ - ./$(DEPDIR)/testing_api_cmd_delete_instance.Plo \ - ./$(DEPDIR)/testing_api_cmd_delete_order.Plo \ - ./$(DEPDIR)/testing_api_cmd_delete_product.Plo \ - ./$(DEPDIR)/testing_api_cmd_delete_reserve.Plo \ - ./$(DEPDIR)/testing_api_cmd_delete_template.Plo \ - ./$(DEPDIR)/testing_api_cmd_delete_transfer.Plo \ - ./$(DEPDIR)/testing_api_cmd_delete_webhook.Plo \ - ./$(DEPDIR)/testing_api_cmd_forget_order.Plo \ - ./$(DEPDIR)/testing_api_cmd_get_instance.Plo \ - ./$(DEPDIR)/testing_api_cmd_get_instances.Plo \ - ./$(DEPDIR)/testing_api_cmd_get_orders.Plo \ - ./$(DEPDIR)/testing_api_cmd_get_product.Plo \ - ./$(DEPDIR)/testing_api_cmd_get_products.Plo \ - ./$(DEPDIR)/testing_api_cmd_get_reserve.Plo \ - ./$(DEPDIR)/testing_api_cmd_get_reserves.Plo \ - ./$(DEPDIR)/testing_api_cmd_get_template.Plo \ - ./$(DEPDIR)/testing_api_cmd_get_templates.Plo \ - ./$(DEPDIR)/testing_api_cmd_get_tips.Plo \ - ./$(DEPDIR)/testing_api_cmd_get_transfers.Plo \ - ./$(DEPDIR)/testing_api_cmd_get_webhook.Plo \ - ./$(DEPDIR)/testing_api_cmd_get_webhooks.Plo \ - ./$(DEPDIR)/testing_api_cmd_instance_auth.Plo \ - ./$(DEPDIR)/testing_api_cmd_kyc_get.Plo \ - ./$(DEPDIR)/testing_api_cmd_lock_product.Plo \ - ./$(DEPDIR)/testing_api_cmd_merchant_get_order.Plo \ - ./$(DEPDIR)/testing_api_cmd_merchant_get_tip.Plo \ - ./$(DEPDIR)/testing_api_cmd_patch_instance.Plo \ - ./$(DEPDIR)/testing_api_cmd_patch_product.Plo \ - ./$(DEPDIR)/testing_api_cmd_patch_template.Plo \ - ./$(DEPDIR)/testing_api_cmd_patch_webhook.Plo \ - ./$(DEPDIR)/testing_api_cmd_pay_order.Plo \ - ./$(DEPDIR)/testing_api_cmd_post_instances.Plo \ - ./$(DEPDIR)/testing_api_cmd_post_orders.Plo \ - ./$(DEPDIR)/testing_api_cmd_post_orders_paid.Plo \ - ./$(DEPDIR)/testing_api_cmd_post_products.Plo \ - ./$(DEPDIR)/testing_api_cmd_post_reserves.Plo \ - ./$(DEPDIR)/testing_api_cmd_post_templates.Plo \ - ./$(DEPDIR)/testing_api_cmd_post_transfers.Plo \ - ./$(DEPDIR)/testing_api_cmd_post_webhooks.Plo \ - ./$(DEPDIR)/testing_api_cmd_refund_order.Plo \ - ./$(DEPDIR)/testing_api_cmd_tip_authorize.Plo \ - ./$(DEPDIR)/testing_api_cmd_tip_pickup.Plo \ - ./$(DEPDIR)/testing_api_cmd_wallet_get_order.Plo \ - ./$(DEPDIR)/testing_api_cmd_wallet_get_tip.Plo \ - ./$(DEPDIR)/testing_api_cmd_wallet_post_orders_refund.Plo \ - ./$(DEPDIR)/testing_api_helpers.Plo \ - ./$(DEPDIR)/testing_api_traits.Plo -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -SOURCES = $(libtalermerchanttesting_la_SOURCES) \ - $(test_kyc_api_SOURCES) $(test_merchant_api_cs_SOURCES) \ - $(test_merchant_api_rsa_SOURCES) \ - $(test_merchant_api_twisted_cs_SOURCES) \ - $(test_merchant_api_twisted_rsa_SOURCES) -DIST_SOURCES = $(libtalermerchanttesting_la_SOURCES) \ - $(test_kyc_api_SOURCES) $(test_merchant_api_cs_SOURCES) \ - $(test_merchant_api_rsa_SOURCES) \ - $(test_merchant_api_twisted_cs_SOURCES) \ - $(test_merchant_api_twisted_rsa_SOURCES) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -am__tty_colors_dummy = \ - mgn= red= grn= lgn= blu= brg= std=; \ - am__color_tests=no -am__tty_colors = { \ - $(am__tty_colors_dummy); \ - if test "X$(AM_COLOR_TESTS)" = Xno; then \ - am__color_tests=no; \ - elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ - am__color_tests=yes; \ - elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ - am__color_tests=yes; \ - fi; \ - if test $$am__color_tests = yes; then \ - red=''; \ - grn=''; \ - lgn=''; \ - blu=''; \ - mgn=''; \ - brg=''; \ - std=''; \ - fi; \ -} -am__recheck_rx = ^[ ]*:recheck:[ ]* -am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* -am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* -# A command that, given a newline-separated list of test names on the -# standard input, print the name of the tests that are to be re-run -# upon "make recheck". -am__list_recheck_tests = $(AWK) '{ \ - recheck = 1; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - { \ - if ((getline line2 < ($$0 ".log")) < 0) \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ - { \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ - { \ - break; \ - } \ - }; \ - if (recheck) \ - print $$0; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# A command that, given a newline-separated list of test names on the -# standard input, create the global log from their .trs and .log files. -am__create_global_log = $(AWK) ' \ -function fatal(msg) \ -{ \ - print "fatal: making $@: " msg | "cat >&2"; \ - exit 1; \ -} \ -function rst_section(header) \ -{ \ - print header; \ - len = length(header); \ - for (i = 1; i <= len; i = i + 1) \ - printf "="; \ - printf "\n\n"; \ -} \ -{ \ - copy_in_global_log = 1; \ - global_test_result = "RUN"; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".trs"); \ - if (line ~ /$(am__global_test_result_rx)/) \ - { \ - sub("$(am__global_test_result_rx)", "", line); \ - sub("[ ]*$$", "", line); \ - global_test_result = line; \ - } \ - else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ - copy_in_global_log = 0; \ - }; \ - if (copy_in_global_log) \ - { \ - rst_section(global_test_result ": " $$0); \ - while ((rc = (getline line < ($$0 ".log"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".log"); \ - print line; \ - }; \ - printf "\n"; \ - }; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# Restructured Text title. -am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } -# Solaris 10 'make', and several other traditional 'make' implementations, -# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it -# by disabling -e (using the XSI extension "set +e") if it's set. -am__sh_e_setup = case $$- in *e*) set +e;; esac -# Default flags passed to test drivers. -am__common_driver_flags = \ - --color-tests "$$am__color_tests" \ - --enable-hard-errors "$$am__enable_hard_errors" \ - --expect-failure "$$am__expect_failure" -# To be inserted before the command running the test. Creates the -# directory for the log if needed. Stores in $dir the directory -# containing $f, in $tst the test, in $log the log. Executes the -# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and -# passes TESTS_ENVIRONMENT. Set up options for the wrapper that -# will run the test scripts (or their associated LOG_COMPILER, if -# thy have one). -am__check_pre = \ -$(am__sh_e_setup); \ -$(am__vpath_adj_setup) $(am__vpath_adj) \ -$(am__tty_colors); \ -srcdir=$(srcdir); export srcdir; \ -case "$@" in \ - */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ - *) am__odir=.;; \ -esac; \ -test "x$$am__odir" = x"." || test -d "$$am__odir" \ - || $(MKDIR_P) "$$am__odir" || exit $$?; \ -if test -f "./$$f"; then dir=./; \ -elif test -f "$$f"; then dir=; \ -else dir="$(srcdir)/"; fi; \ -tst=$$dir$$f; log='$@'; \ -if test -n '$(DISABLE_HARD_ERRORS)'; then \ - am__enable_hard_errors=no; \ -else \ - am__enable_hard_errors=yes; \ -fi; \ -case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ - am__expect_failure=yes;; \ - *) \ - am__expect_failure=no;; \ -esac; \ -$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) -# A shell command to get the names of the tests scripts with any registered -# extension removed (i.e., equivalently, the names of the test logs, with -# the '.log' extension removed). The result is saved in the shell variable -# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, -# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", -# since that might cause problem with VPATH rewrites for suffix-less tests. -# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. -am__set_TESTS_bases = \ - bases='$(TEST_LOGS)'; \ - bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ - bases=`echo $$bases` -AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' -RECHECK_LOGS = $(TEST_LOGS) -AM_RECURSIVE_TARGETS = check recheck -TEST_SUITE_LOG = test-suite.log -TEST_EXTENSIONS = .test -LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver -LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) -am__set_b = \ - case '$@' in \ - */*) \ - case '$*' in \ - */*) b='$*';; \ - *) b=`echo '$@' | sed 's/\.log$$//'`; \ - esac;; \ - *) \ - b='$*';; \ - esac -am__test_logs1 = $(TESTS:=.log) -am__test_logs2 = $(am__test_logs1:.log=.log) -TEST_LOGS = $(am__test_logs2:.test.log=.log) -TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver -TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ - $(TEST_LOG_FLAGS) -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ - $(top_srcdir)/test-driver -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = ${SHELL} '/home/priscilla/merchant/missing' aclocal-1.16 -AMTAR = $${TAR-tar} -AM_DEFAULT_VERBOSITY = 0 -AR = ar -AUTOCONF = ${SHELL} '/home/priscilla/merchant/missing' autoconf -AUTOHEADER = ${SHELL} '/home/priscilla/merchant/missing' autoheader -AUTOMAKE = ${SHELL} '/home/priscilla/merchant/missing' automake-1.16 -AWK = mawk -CC = gcc -CCDEPMODE = depmode=gcc3 -CFLAGS = -Wall -Wno-address-of-packed-member -g -O2 -CPP = gcc -E -CPPFLAGS = -I/home/priscilla/install/include -I/home/priscilla/install/include -I/usr/include/postgresql -I/usr/include/postgresql -I/usr/include/postgresql -I/usr/include/postgresql -CYGPATH_W = echo -DEFS = -DHAVE_CONFIG_H -DEPDIR = .deps -DLLTOOL = false -DOXYGEN_PAPER_SIZE = -DSYMUTIL = -DUMPBIN = -DX_CONFIG = $(srcdir)/Doxyfile -DX_CONFIG2 = $(srcdir)/Doxyfile -DX_CONFIG3 = $(srcdir)/Doxyfile -DX_CONFIG4 = $(srcdir)/Doxyfile -DX_DOCDIR = doxygen-doc -DX_DOCDIR2 = doxygen-doc -DX_DOCDIR3 = doxygen-doc -DX_DOCDIR4 = doxygen-doc -DX_DOT = -DX_DOXYGEN = -DX_DVIPS = -DX_EGREP = -DX_ENV = SRCDIR='.' PROJECT='taler-merchant' VERSION='0.9.0' HAVE_DOT='NO' GENERATE_MAN='NO' GENERATE_RTF='NO' GENERATE_XML='NO' GENERATE_HTMLHELP='NO' GENERATE_CHI='NO' GENERATE_HTML='NO' GENERATE_LATEX='NO' -DX_FLAG_chi = 0 -DX_FLAG_chm = 0 -DX_FLAG_doc = 0 -DX_FLAG_dot = 0 -DX_FLAG_html = 0 -DX_FLAG_man = 0 -DX_FLAG_pdf = 0 -DX_FLAG_ps = 0 -DX_FLAG_rtf = 0 -DX_FLAG_xml = 0 -DX_HHC = -DX_LATEX = -DX_MAKEINDEX = -DX_PDFLATEX = -DX_PERL = /usr/bin/perl -DX_PROJECT = taler-merchant -ECHO_C = -ECHO_N = -n -ECHO_T = -EGREP = /usr/bin/grep -E -EXEEXT = -FGREP = /usr/bin/grep -F -GREP = /usr/bin/grep -INSTALL = /usr/bin/install -c -INSTALL_DATA = ${INSTALL} -m 644 -INSTALL_PROGRAM = ${INSTALL} -INSTALL_SCRIPT = ${INSTALL} -INSTALL_STRIP_PROGRAM = $(install_sh) -c -s -JANSSON_CFLAGS = -JANSSON_LIBS = -ljansson -LD = /usr/bin/ld -m elf_x86_64 -LDFLAGS = -L/home/priscilla/install/lib -ljansson -L/home/priscilla/install/lib -LIBCURL = -lcurl -LIBCURL_CPPFLAGS = -LIBGCRYPT_CFLAGS = -LIBGCRYPT_CONFIG = /usr/bin/libgcrypt-config -LIBGCRYPT_LIBS = -L/usr/lib/x86_64-linux-gnu -lgcrypt -LIBOBJS = -LIBS = -LIBTOOL = $(SHELL) $(top_builddir)/libtool -LIPO = -LN_S = ln -s -LTLIBOBJS = -LT_SYS_LIBRARY_PATH = -MAKEINFO = ${SHELL} '/home/priscilla/merchant/missing' makeinfo -MANIFEST_TOOL = : -MKDIR_P = /usr/bin/mkdir -p -NM = /usr/bin/nm -B -NMEDIT = -OBJC = gcc -OBJCDEPMODE = depmode=gcc3 -OBJCFLAGS = -OBJDUMP = objdump -OBJEXT = o -OTOOL = -OTOOL64 = -PACKAGE = taler-merchant -PACKAGE_BUGREPORT = taler-bug@gnunet.org -PACKAGE_NAME = taler-merchant -PACKAGE_STRING = taler-merchant 0.9.0 -PACKAGE_TARNAME = taler-merchant -PACKAGE_URL = -PACKAGE_VERSION = 0.9.0 -PATH_SEPARATOR = : -PKG_CONFIG = /usr/bin/pkg-config -PKG_CONFIG_LIBDIR = -PKG_CONFIG_PATH = -POSTGRESQL_CPPFLAGS = -I/usr/include/postgresql -POSTGRESQL_LDFLAGS = -POSTGRESQL_LIBFLAGS = -POSTGRESQL_LIBS = -lpq -POSTGRESQL_VERSION = 13.8 -QR_CFLAGS = -QR_LIBS = -lqrencode -RANLIB = ranlib -SED = /usr/bin/sed -SET_MAKE = -SHELL = /bin/bash -STRIP = strip -TALER_LIB_LDFLAGS = -export-dynamic -no-undefined -TALER_PLUGIN_LDFLAGS = -export-dynamic -avoid-version -module -no-undefined -VERSION = 0.9.0 -_libcurl_config = -abs_builddir = /home/priscilla/merchant/src/testing -abs_srcdir = /home/priscilla/merchant/src/testing -abs_top_builddir = /home/priscilla/merchant -abs_top_srcdir = /home/priscilla/merchant -ac_ct_AR = ar -ac_ct_CC = gcc -ac_ct_DUMPBIN = -ac_ct_OBJC = gcc -am__include = include -am__leading_dot = . -am__quote = -am__tar = tar --format=posix -chf - "$$tardir" -am__untar = tar -xf - -bindir = ${exec_prefix}/bin -build = x86_64-pc-linux-gnu -build_alias = -build_cpu = x86_64 -build_os = linux-gnu -build_vendor = pc -builddir = . -datadir = ${datarootdir} -datarootdir = ${prefix}/share -docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} -dvidir = ${docdir} -exec_prefix = ${prefix} -gitcommand = /usr/bin/git -host = x86_64-pc-linux-gnu -host_alias = -host_cpu = x86_64 -host_os = linux-gnu -host_vendor = pc -htmldir = ${docdir} -includedir = ${prefix}/include -infodir = ${datarootdir}/info -install_sh = ${SHELL} /home/priscilla/merchant/install-sh -libdir = ${exec_prefix}/lib -libexecdir = ${exec_prefix}/libexec -localedir = ${datarootdir}/locale -localstatedir = ${prefix}/var -mandir = ${datarootdir}/man -mkdir_p = $(MKDIR_P) -oldincludedir = /usr/include -pdfdir = ${docdir} -prefix = /home/priscilla/install -program_transform_name = s,x,x, -psdir = ${docdir} -runstatedir = ${localstatedir}/run -sbindir = ${exec_prefix}/sbin -sharedstatedir = ${prefix}/com -srcdir = . -sysconfdir = ${prefix}/etc -target_alias = -top_build_prefix = ../../ -top_builddir = ../.. -top_srcdir = ../.. -tsc = no - -# This Makefile.am is in the public domain -AM_CPPFLAGS = -I$(top_srcdir)/src/include -I$(top_srcdir)/src/backend -#AM_CFLAGS = --coverage -O0 -#XLIB = -lgcov -check_SCRIPTS = \ - test-merchant-walletharness.sh \ - test_merchant_instance_auth.sh \ - test_merchant_instance_response.sh \ - test_merchant_instance_purge.sh \ - test_merchant_reserve_creation.sh \ - test_merchant_product_creation.sh \ - test_merchant_order_creation.sh \ - test_merchant_transfer_tracking.sh - -lib_LTLIBRARIES = \ - libtalermerchanttesting.la - -libtalermerchanttesting_la_LDFLAGS = \ - -version-info 2:0:0 \ - -no-undefined - -libtalermerchanttesting_la_SOURCES = \ - testing_api_cmd_config.c \ - testing_api_cmd_abort_order.c \ - testing_api_cmd_claim_order.c \ - testing_api_cmd_get_instance.c \ - testing_api_cmd_get_instances.c \ - testing_api_cmd_get_orders.c \ - testing_api_cmd_get_product.c \ - testing_api_cmd_get_products.c \ - testing_api_cmd_get_reserve.c \ - testing_api_cmd_get_reserves.c \ - testing_api_cmd_get_tips.c \ - testing_api_cmd_get_transfers.c \ - testing_api_cmd_get_templates.c \ - testing_api_cmd_get_template.c \ - testing_api_cmd_get_webhooks.c \ - testing_api_cmd_get_webhook.c \ - testing_api_cmd_delete_instance.c \ - testing_api_cmd_delete_order.c \ - testing_api_cmd_delete_product.c \ - testing_api_cmd_delete_template.c \ - testing_api_cmd_delete_webhook.c \ - testing_api_cmd_delete_reserve.c \ - testing_api_cmd_delete_transfer.c \ - testing_api_cmd_forget_order.c \ - testing_api_cmd_kyc_get.c \ - testing_api_cmd_lock_product.c \ - testing_api_cmd_instance_auth.c \ - testing_api_cmd_merchant_get_order.c \ - testing_api_cmd_merchant_get_tip.c \ - testing_api_cmd_pay_order.c \ - testing_api_cmd_post_instances.c \ - testing_api_cmd_post_orders_paid.c \ - testing_api_cmd_post_orders.c \ - testing_api_cmd_post_products.c \ - testing_api_cmd_post_reserves.c \ - testing_api_cmd_post_transfers.c \ - testing_api_cmd_post_templates.c \ - testing_api_cmd_post_webhooks.c \ - testing_api_cmd_patch_instance.c \ - testing_api_cmd_patch_product.c \ - testing_api_cmd_patch_template.c \ - testing_api_cmd_patch_webhook.c \ - testing_api_cmd_refund_order.c \ - \ - testing_api_cmd_tip_authorize.c \ - testing_api_cmd_tip_pickup.c \ - testing_api_cmd_wallet_get_order.c \ - testing_api_cmd_wallet_get_tip.c \ - testing_api_cmd_wallet_post_orders_refund.c \ - testing_api_helpers.c \ - testing_api_traits.c - -libtalermerchanttesting_la_LIBADD = \ - $(top_srcdir)/src/lib/libtalermerchant.la \ - -ltalerbank \ - -ltalerexchange \ - -ltalerjson \ - -ltalerutil \ - -lgnunetcurl \ - -lgnunetjson \ - -lgnunetutil \ - -ljansson \ - -ltalertesting \ - $(XLIB) - -TESTS = \ - $(check_PROGRAMS) \ - $(check_SCRIPTS) - -test_merchant_api_twisted_cs_SOURCES = \ - test_merchant_api_twisted.c - -test_merchant_api_twisted_cs_LDADD = \ - $(top_srcdir)/src/backenddb/libtalermerchantdb.la \ - $(top_srcdir)/src/lib/libtalermerchant.la \ - $(LIBGCRYPT_LIBS) \ - -ltalertesting \ - -ltalermerchanttesting \ - -ltalertwistertesting \ - -ltalerfakebank \ - -ltalerbank \ - -ltalerexchange \ - -ltalerjson \ - -ltalerutil \ - -lgnunettesting \ - -lgnunetjson \ - -lgnunetcurl \ - -lgnunetutil \ - -ljansson \ - -ltalertwister \ - $(XLIB) - -test_merchant_api_twisted_rsa_SOURCES = \ - test_merchant_api_twisted.c - -test_merchant_api_twisted_rsa_LDADD = \ - $(top_srcdir)/src/backenddb/libtalermerchantdb.la \ - $(top_srcdir)/src/lib/libtalermerchant.la \ - $(LIBGCRYPT_LIBS) \ - -ltalertesting \ - -ltalermerchanttesting \ - -ltalertwistertesting \ - -ltalerfakebank \ - -ltalerbank \ - -ltalerexchange \ - -ltalerjson \ - -ltalerutil \ - -lgnunettesting \ - -lgnunetjson \ - -lgnunetcurl \ - -lgnunetutil \ - -ljansson \ - -ltalertwister \ - $(XLIB) - -test_merchant_api_cs_SOURCES = \ - test_merchant_api.c - -test_merchant_api_cs_LDADD = \ - libtalermerchanttesting.la \ - $(top_srcdir)/src/backenddb/libtalermerchantdb.la \ - $(top_srcdir)/src/lib/libtalermerchant.la \ - $(LIBGCRYPT_LIBS) \ - -ltalertesting \ - -ltalerfakebank \ - -ltalerbank \ - -ltalerexchange \ - -ltalerjson \ - -ltalerutil \ - -lgnunettesting \ - -lgnunetjson \ - -lgnunetcurl \ - -lgnunetutil \ - -ljansson \ - $(XLIB) - -test_merchant_api_rsa_SOURCES = \ - test_merchant_api.c - -test_merchant_api_rsa_LDADD = \ - libtalermerchanttesting.la \ - $(top_srcdir)/src/backenddb/libtalermerchantdb.la \ - $(top_srcdir)/src/lib/libtalermerchant.la \ - $(LIBGCRYPT_LIBS) \ - -ltalertesting \ - -ltalerfakebank \ - -ltalerbank \ - -ltalerexchange \ - -ltalerjson \ - -ltalerutil \ - -lgnunettesting \ - -lgnunetjson \ - -lgnunetcurl \ - -lgnunetutil \ - -ljansson \ - $(XLIB) - -test_kyc_api_SOURCES = \ - test_kyc_api.c - -test_kyc_api_LDADD = \ - libtalermerchanttesting.la \ - $(top_srcdir)/src/backenddb/libtalermerchantdb.la \ - $(top_srcdir)/src/lib/libtalermerchant.la \ - $(LIBGCRYPT_LIBS) \ - -ltalertesting \ - -ltalerfakebank \ - -ltalerbank \ - -ltalerexchange \ - -ltalerjson \ - -ltalerutil \ - -lgnunetjson \ - -lgnunetcurl \ - -lgnunetutil \ - -ljansson \ - $(XLIB) - -EXTRA_DIST = \ - initialize_taler_system.sh \ - test_key_rotation.sh \ - test_key_rotation.conf \ - test_kyc_api.conf \ - test_merchant_api-cs.conf \ - test_merchant_api-rsa.conf \ - test_merchant_api_twisted-cs.conf \ - test_merchant_api_twisted-rsa.conf \ - test_merchant_api_proxy_merchant.conf \ - test_merchant_api_proxy_exchange.conf \ - test_merchant_api_home/.local/share/taler/exchange-offline/master.priv \ - test_merchant_api_home/.local/share/taler/exchange/offline-keys/master.priv \ - test_merchant_api_home/.config/taler/exchange/account-2.json \ - test_merchant.priv \ - test_template.conf \ - $(check_SCRIPTS) - -MOSTLYCLEANFILES = \ - test_merchant_api_home/.local/share/taler/exchange/offline-keys/secm_tofus.pub - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/testing/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/testing/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; \ - locs=`for p in $$list; do echo $$p; done | \ - sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ - sort -u`; \ - test -z "$$locs" || { \ - echo rm -f $${locs}; \ - rm -f $${locs}; \ - } - -libtalermerchanttesting.la: $(libtalermerchanttesting_la_OBJECTS) $(libtalermerchanttesting_la_DEPENDENCIES) $(EXTRA_libtalermerchanttesting_la_DEPENDENCIES) - $(AM_V_CCLD)$(libtalermerchanttesting_la_LINK) -rpath $(libdir) $(libtalermerchanttesting_la_OBJECTS) $(libtalermerchanttesting_la_LIBADD) $(LIBS) - -test_kyc_api$(EXEEXT): $(test_kyc_api_OBJECTS) $(test_kyc_api_DEPENDENCIES) $(EXTRA_test_kyc_api_DEPENDENCIES) - @rm -f test_kyc_api$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(test_kyc_api_OBJECTS) $(test_kyc_api_LDADD) $(LIBS) - -test_merchant_api_cs$(EXEEXT): $(test_merchant_api_cs_OBJECTS) $(test_merchant_api_cs_DEPENDENCIES) $(EXTRA_test_merchant_api_cs_DEPENDENCIES) - @rm -f test_merchant_api_cs$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(test_merchant_api_cs_OBJECTS) $(test_merchant_api_cs_LDADD) $(LIBS) - -test_merchant_api_rsa$(EXEEXT): $(test_merchant_api_rsa_OBJECTS) $(test_merchant_api_rsa_DEPENDENCIES) $(EXTRA_test_merchant_api_rsa_DEPENDENCIES) - @rm -f test_merchant_api_rsa$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(test_merchant_api_rsa_OBJECTS) $(test_merchant_api_rsa_LDADD) $(LIBS) - -test_merchant_api_twisted_cs$(EXEEXT): $(test_merchant_api_twisted_cs_OBJECTS) $(test_merchant_api_twisted_cs_DEPENDENCIES) $(EXTRA_test_merchant_api_twisted_cs_DEPENDENCIES) - @rm -f test_merchant_api_twisted_cs$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(test_merchant_api_twisted_cs_OBJECTS) $(test_merchant_api_twisted_cs_LDADD) $(LIBS) - -test_merchant_api_twisted_rsa$(EXEEXT): $(test_merchant_api_twisted_rsa_OBJECTS) $(test_merchant_api_twisted_rsa_DEPENDENCIES) $(EXTRA_test_merchant_api_twisted_rsa_DEPENDENCIES) - @rm -f test_merchant_api_twisted_rsa$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(test_merchant_api_twisted_rsa_OBJECTS) $(test_merchant_api_twisted_rsa_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -include ./$(DEPDIR)/test_kyc_api.Po # am--include-marker -include ./$(DEPDIR)/test_merchant_api.Po # am--include-marker -include ./$(DEPDIR)/test_merchant_api_twisted.Po # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_abort_order.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_claim_order.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_config.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_delete_instance.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_delete_order.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_delete_product.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_delete_reserve.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_delete_template.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_delete_transfer.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_delete_webhook.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_forget_order.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_get_instance.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_get_instances.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_get_orders.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_get_product.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_get_products.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_get_reserve.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_get_reserves.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_get_template.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_get_templates.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_get_tips.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_get_transfers.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_get_webhook.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_get_webhooks.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_instance_auth.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_kyc_get.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_lock_product.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_merchant_get_order.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_merchant_get_tip.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_patch_instance.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_patch_product.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_patch_template.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_patch_webhook.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_pay_order.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_post_instances.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_post_orders.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_post_orders_paid.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_post_products.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_post_reserves.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_post_templates.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_post_transfers.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_post_webhooks.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_refund_order.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_tip_authorize.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_tip_pickup.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_wallet_get_order.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_wallet_get_tip.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_cmd_wallet_post_orders_refund.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_helpers.Plo # am--include-marker -include ./$(DEPDIR)/testing_api_traits.Plo # am--include-marker - -$(am__depfiles_remade): - @$(MKDIR_P) $(@D) - @echo '# dummy' >$@-t && $(am__mv) $@-t $@ - -am--depfiles: $(am__depfiles_remade) - -.c.o: - $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ - $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ - $(am__mv) $$depbase.Tpo $$depbase.Po -# $(AM_V_CC)source='$<' object='$@' libtool=no \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(COMPILE) -c -o $@ $< - -.c.obj: - $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ - $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ - $(am__mv) $$depbase.Tpo $$depbase.Po -# $(AM_V_CC)source='$<' object='$@' libtool=no \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: - $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ - $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ - $(am__mv) $$depbase.Tpo $$depbase.Plo -# $(AM_V_CC)source='$<' object='$@' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-am -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-am - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-am - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -# Recover from deleted '.trs' file; this should ensure that -# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create -# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells -# to avoid problems with "make -n". -.log.trs: - rm -f $< $@ - $(MAKE) $(AM_MAKEFLAGS) $< - -# Leading 'am--fnord' is there to ensure the list of targets does not -# expand to empty, as could happen e.g. with make check TESTS=''. -am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) -am--force-recheck: - @: - -$(TEST_SUITE_LOG): $(TEST_LOGS) - @$(am__set_TESTS_bases); \ - am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ - redo_bases=`for i in $$bases; do \ - am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ - done`; \ - if test -n "$$redo_bases"; then \ - redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ - redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ - if $(am__make_dryrun); then :; else \ - rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ - fi; \ - fi; \ - if test -n "$$am__remaking_logs"; then \ - echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ - "recursion detected" >&2; \ - elif test -n "$$redo_logs"; then \ - am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ - fi; \ - if $(am__make_dryrun); then :; else \ - st=0; \ - errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ - for i in $$redo_bases; do \ - test -f $$i.trs && test -r $$i.trs \ - || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ - test -f $$i.log && test -r $$i.log \ - || { echo "$$errmsg $$i.log" >&2; st=1; }; \ - done; \ - test $$st -eq 0 || exit 1; \ - fi - @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ - ws='[ ]'; \ - results=`for b in $$bases; do echo $$b.trs; done`; \ - test -n "$$results" || results=/dev/null; \ - all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ - pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ - fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ - skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ - xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ - xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ - error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ - if test `expr $$fail + $$xpass + $$error` -eq 0; then \ - success=true; \ - else \ - success=false; \ - fi; \ - br='==================='; br=$$br$$br$$br$$br; \ - result_count () \ - { \ - if test x"$$1" = x"--maybe-color"; then \ - maybe_colorize=yes; \ - elif test x"$$1" = x"--no-color"; then \ - maybe_colorize=no; \ - else \ - echo "$@: invalid 'result_count' usage" >&2; exit 4; \ - fi; \ - shift; \ - desc=$$1 count=$$2; \ - if test $$maybe_colorize = yes && test $$count -gt 0; then \ - color_start=$$3 color_end=$$std; \ - else \ - color_start= color_end=; \ - fi; \ - echo "$${color_start}# $$desc $$count$${color_end}"; \ - }; \ - create_testsuite_report () \ - { \ - result_count $$1 "TOTAL:" $$all "$$brg"; \ - result_count $$1 "PASS: " $$pass "$$grn"; \ - result_count $$1 "SKIP: " $$skip "$$blu"; \ - result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ - result_count $$1 "FAIL: " $$fail "$$red"; \ - result_count $$1 "XPASS:" $$xpass "$$red"; \ - result_count $$1 "ERROR:" $$error "$$mgn"; \ - }; \ - { \ - echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ - $(am__rst_title); \ - create_testsuite_report --no-color; \ - echo; \ - echo ".. contents:: :depth: 2"; \ - echo; \ - for b in $$bases; do echo $$b; done \ - | $(am__create_global_log); \ - } >$(TEST_SUITE_LOG).tmp || exit 1; \ - mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ - if $$success; then \ - col="$$grn"; \ - else \ - col="$$red"; \ - test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ - fi; \ - echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ - echo "$${col}$$br$${std}"; \ - create_testsuite_report --maybe-color; \ - echo "$$col$$br$$std"; \ - if $$success; then :; else \ - echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ - if test -n "$(PACKAGE_BUGREPORT)"; then \ - echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ - fi; \ - echo "$$col$$br$$std"; \ - fi; \ - $$success || exit 1 - -check-TESTS: $(check_PROGRAMS) $(check_SCRIPTS) - @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list - @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set +e; $(am__set_TESTS_bases); \ - log_list=`for i in $$bases; do echo $$i.log; done`; \ - trs_list=`for i in $$bases; do echo $$i.trs; done`; \ - log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ - exit $$?; -recheck: all $(check_PROGRAMS) $(check_SCRIPTS) - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set +e; $(am__set_TESTS_bases); \ - bases=`for i in $$bases; do echo $$i; done \ - | $(am__list_recheck_tests)` || exit 1; \ - log_list=`for i in $$bases; do echo $$i.log; done`; \ - log_list=`echo $$log_list`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ - am__force_recheck=am--force-recheck \ - TEST_LOGS="$$log_list"; \ - exit $$? -test_merchant_api_cs.log: test_merchant_api_cs$(EXEEXT) - @p='test_merchant_api_cs$(EXEEXT)'; \ - b='test_merchant_api_cs'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -test_merchant_api_rsa.log: test_merchant_api_rsa$(EXEEXT) - @p='test_merchant_api_rsa$(EXEEXT)'; \ - b='test_merchant_api_rsa'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -test_kyc_api.log: test_kyc_api$(EXEEXT) - @p='test_kyc_api$(EXEEXT)'; \ - b='test_kyc_api'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -test_merchant_api_twisted_cs.log: test_merchant_api_twisted_cs$(EXEEXT) - @p='test_merchant_api_twisted_cs$(EXEEXT)'; \ - b='test_merchant_api_twisted_cs'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -test_merchant_api_twisted_rsa.log: test_merchant_api_twisted_rsa$(EXEEXT) - @p='test_merchant_api_twisted_rsa$(EXEEXT)'; \ - b='test_merchant_api_twisted_rsa'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -test-merchant-walletharness.sh.log: test-merchant-walletharness.sh - @p='test-merchant-walletharness.sh'; \ - b='test-merchant-walletharness.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -test_merchant_instance_auth.sh.log: test_merchant_instance_auth.sh - @p='test_merchant_instance_auth.sh'; \ - b='test_merchant_instance_auth.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -test_merchant_instance_response.sh.log: test_merchant_instance_response.sh - @p='test_merchant_instance_response.sh'; \ - b='test_merchant_instance_response.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -test_merchant_instance_purge.sh.log: test_merchant_instance_purge.sh - @p='test_merchant_instance_purge.sh'; \ - b='test_merchant_instance_purge.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -test_merchant_reserve_creation.sh.log: test_merchant_reserve_creation.sh - @p='test_merchant_reserve_creation.sh'; \ - b='test_merchant_reserve_creation.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -test_merchant_product_creation.sh.log: test_merchant_product_creation.sh - @p='test_merchant_product_creation.sh'; \ - b='test_merchant_product_creation.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -test_merchant_order_creation.sh.log: test_merchant_order_creation.sh - @p='test_merchant_order_creation.sh'; \ - b='test_merchant_order_creation.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -test_merchant_transfer_tracking.sh.log: test_merchant_transfer_tracking.sh - @p='test_merchant_transfer_tracking.sh'; \ - b='test_merchant_transfer_tracking.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -.test.log: - @p='$<'; \ - $(am__set_b); \ - $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -#.test$(EXEEXT).log: -# @p='$<'; \ -# $(am__set_b); \ -# $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ -# --log-file $$b.log --trs-file $$b.trs \ -# $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ -# "$$tst" $(AM_TESTS_FD_REDIRECT) - -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(check_SCRIPTS) - $(MAKE) $(AM_MAKEFLAGS) check-TESTS -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: - for dir in "$(DESTDIR)$(libdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) - -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) - -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) - -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \ - clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f ./$(DEPDIR)/test_kyc_api.Po - -rm -f ./$(DEPDIR)/test_merchant_api.Po - -rm -f ./$(DEPDIR)/test_merchant_api_twisted.Po - -rm -f ./$(DEPDIR)/testing_api_cmd_abort_order.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_claim_order.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_config.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_delete_instance.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_delete_order.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_delete_product.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_delete_reserve.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_delete_template.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_delete_transfer.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_delete_webhook.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_forget_order.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_get_instance.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_get_instances.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_get_orders.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_get_product.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_get_products.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_get_reserve.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_get_reserves.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_get_template.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_get_templates.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_get_tips.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_get_transfers.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_get_webhook.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_get_webhooks.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_instance_auth.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_kyc_get.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_lock_product.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_merchant_get_order.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_merchant_get_tip.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_patch_instance.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_patch_product.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_patch_template.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_patch_webhook.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_pay_order.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_post_instances.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_post_orders.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_post_orders_paid.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_post_products.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_post_reserves.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_post_templates.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_post_transfers.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_post_webhooks.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_refund_order.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_tip_authorize.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_tip_pickup.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_wallet_get_order.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_wallet_get_tip.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_wallet_post_orders_refund.Plo - -rm -f ./$(DEPDIR)/testing_api_helpers.Plo - -rm -f ./$(DEPDIR)/testing_api_traits.Plo - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-libLTLIBRARIES - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f ./$(DEPDIR)/test_kyc_api.Po - -rm -f ./$(DEPDIR)/test_merchant_api.Po - -rm -f ./$(DEPDIR)/test_merchant_api_twisted.Po - -rm -f ./$(DEPDIR)/testing_api_cmd_abort_order.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_claim_order.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_config.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_delete_instance.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_delete_order.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_delete_product.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_delete_reserve.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_delete_template.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_delete_transfer.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_delete_webhook.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_forget_order.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_get_instance.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_get_instances.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_get_orders.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_get_product.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_get_products.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_get_reserve.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_get_reserves.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_get_template.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_get_templates.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_get_tips.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_get_transfers.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_get_webhook.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_get_webhooks.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_instance_auth.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_kyc_get.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_lock_product.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_merchant_get_order.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_merchant_get_tip.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_patch_instance.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_patch_product.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_patch_template.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_patch_webhook.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_pay_order.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_post_instances.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_post_orders.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_post_orders_paid.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_post_products.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_post_reserves.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_post_templates.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_post_transfers.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_post_webhooks.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_refund_order.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_tip_authorize.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_tip_pickup.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_wallet_get_order.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_wallet_get_tip.Plo - -rm -f ./$(DEPDIR)/testing_api_cmd_wallet_post_orders_refund.Plo - -rm -f ./$(DEPDIR)/testing_api_helpers.Plo - -rm -f ./$(DEPDIR)/testing_api_traits.Plo - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-libLTLIBRARIES - -.MAKE: check-am install-am install-strip - -.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-TESTS \ - check-am clean clean-checkPROGRAMS clean-generic \ - clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \ - ctags-am distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-libLTLIBRARIES install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - recheck tags tags-am uninstall uninstall-am \ - uninstall-libLTLIBRARIES - -.PRECIOUS: Makefile - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/src/testing/#testing_api_cmd_post_products.c# b/src/testing/#testing_api_cmd_post_products.c# @@ -0,0 +1,332 @@ +/* + This file is part of TALER + Copyright (C) 2020 Taler Systems SA + + TALER is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 3, or + (at your option) any later version. + + TALER is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public + License along with TALER; see the file COPYING. If not, see + <http://www.gnu.org/licenses/> +*/ +/** + * @file testing_api_cmd_post_products.c + * @brief command to test POST /products + * @author Christian Grothoff + */ +#include "platform.h" +#include <taler/taler_exchange_service.h> +#include <taler/taler_testing_lib.h> +#include "taler_merchant_service.h" +#include "taler_merchant_testing_lib.h" + + +/** + * State of a "POST /products" CMD. + */ +struct PostProductsState +{ + + /** + * Handle for a "GET product" request. + */ + struct TALER_MERCHANT_ProductsPostHandle *iph; + + /** + * The interpreter state. + */ + struct TALER_TESTING_Interpreter *is; + + /** + * Base URL of the merchant serving the request. + */ + const char *merchant_url; + + /** + * ID of the product to run POST for. + */ + const char *product_id; + + /** + * description of the product + */ + const char *description; + + /** + * Map from IETF BCP 47 language tags to localized descriptions + */ + json_t *description_i18n; + + /** + * unit in which the product is measured (liters, kilograms, packages, etc.) + */ + const char *unit; + + /** + * the price for one @a unit of the product + */ + struct TALER_Amount price; + + /** + * base64-encoded product image + */ + char *image; + + /** + * list of taxes paid by the merchant + */ + json_t *taxes; + + /** + * in @e units, -1 to indicate "infinite" (i.e. electronic books) + */ + int64_t total_stock; + + /** + * where the product is in stock + */ + json_t *address; + + /** + * when the next restocking is expected to happen, 0 for unknown, + */ + struct GNUNET_TIME_Timestamp next_restock; + + /** + * Expected HTTP response code. + */ + unsigned int http_status; + +}; + + +/** + * Callback for a POST /products operation. + * + * @param cls closure for this function + * @param hr response being processed + */ +static void +post_products_cb (void *cls, + const struct TALER_MERCHANT_HttpResponse *hr) +{ + struct PostProductsState *pis = cls; + + pis->iph = NULL; + if (pis->http_status != hr->http_status) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Unexpected response code %u (%d) to command %s\n", + hr->http_status, + (int) hr->ec, + TALER_TESTING_interpreter_get_current_label (pis->is)); + TALER_TESTING_interpreter_fail (pis->is); + return; + } + switch (hr->http_status) + { + case MHD_HTTP_NO_CONTENT: + break; + case MHD_HTTP_UNAUTHORIZED: + break; + case MHD_HTTP_FORBIDDEN: + break; + case MHD_HTTP_NOT_FOUND: + break; + case MHD_HTTP_CONFLICT: + break; + default: + GNUNET_break (0); + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "Unhandled HTTP status %u for POST /products.\n", + hr->http_status); + } + TALER_TESTING_interpreter_next (pis->is); +} + + +/** + * Run the "POST /products" CMD. + * + * + * @param cls closure. + * @param cmd command being run now. + * @param is interpreter state. + */ +static void +post_products_run (void *cls, + const struct TALER_TESTING_Command *cmd, + struct TALER_TESTING_Interpreter *is) +{ + struct PostProductsState *pis = cls; + + pis->is = is; + pis->iph = TALER_MERCHANT_products_post (is->ctx, + pis->merchant_url, + pis->product_id, + pis->description, + pis->description_i18n, + pis->unit, + &pis->price, + pis->image, + pis->taxes, + pis->total_stock, + pis->address, + pis->next_restock, + &post_products_cb, + pis); + GNUNET_assert (NULL != pis->iph); +} + + +/** + * Offers information from the POST /products CMD state to other + * commands. + * + * @param cls closure + * @param[out] ret result (could be anything) + * @param trait name of the trait + * @param index index number of the object to extract. + * @return #GNUNET_OK on success + */ +static int +post_products_traits (void *cls, + const void **ret, + const char *trait, + unsigned int index) +{ + struct PostProductsState *pps = cls; + struct TALER_TESTING_Trait traits[] = { + TALER_TESTING_make_trait_product_description (&pps->description), + TALER_TESTING_make_trait_i18n_description (pps->description_i18n), + TALER_TESTING_make_trait_product_unit (&pps->unit), + TALER_TESTING_make_trait_amount (&pps->price), + TALER_TESTING_make_trait_product_image ( + (const char **) &pps->image), + TALER_TESTING_make_trait_taxes (pps->taxes), + TALER_TESTING_make_trait_product_stock (&pps->total_stock), + TALER_TESTING_make_trait_address (pps->address), + TALER_TESTING_make_trait_timestamp (0, + &pps->next_restock), + TALER_TESTING_make_trait_product_id (&pps->product_id), + TALER_TESTING_trait_end (), + }; + + return TALER_TESTING_get_trait (traits, + ret, + trait, + index); +} + + +/** + * Free the state of a "POST product" CMD, and possibly + * cancel a pending operation thereof. + * + * @param cls closure. + * @param cmd command being run. + */ +static void +post_products_cleanup (void *cls, + const struct TALER_TESTING_Command *cmd) +{ + struct PostProductsState *pis = cls; + + if (NULL != pis->iph) + { + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "POST /products operation did not complete\n"); + TALER_MERCHANT_products_post_cancel (pis->iph); + } + json_decref (pis->description_i18n); + GNUNET_free (pis->image); + json_decref (pis->taxes); + json_decref (pis->address); + GNUNET_free (pis); +} + + +struct TALER_TESTING_Command +TALER_TESTING_cmd_merchant_post_products2 ( + const char *label, + const char *merchant_url, + const char *product_id, + const char *description, + json_t *description_i18n, + const char *unit, + const char *price, + const char *image, + json_t *taxes, + int64_t total_stock, + json_t *address, + struct GNUNET_TIME_Timestamp next_restock, + unsigned int http_status) +{ + struct PostProductsState *pis; + + GNUNET_assert ((NULL == taxes) || + json_is_array (taxes)); + GNUNET_assert ((NULL == description_i18n) || + json_is_object (description_i18n)); + pis = GNUNET_new (struct PostProductsState); + pis->merchant_url = merchant_url; + pis->product_id = product_id; + pis->http_status = http_status; + pis->description = description; + pis->description_i18n = description_i18n; /* ownership taken */ + pis->unit = unit; + GNUNET_assert (GNUNET_OK == + TALER_string_to_amount (price, + &pis->price)); + pis->image = GNUNET_strdup (image); + pis->taxes = taxes; /* ownership taken */ + pis->total_stock = total_stock; + pis->address = address; /* ownership taken */ + pis->next_restock = next_restock; + { + struct TALER_TESTING_Command cmd = { + .cls = pis, + .label = label, + .run = &post_products_run, + .cleanup = &post_products_cleanup, + .traits = &post_products_traits + }; + + return cmd; + } +} + + +struct TALER_TESTING_Command +TALER_TESTING_cmd_merchant_post_products (const char *label, + const char *merchant_url, + const char *product_id, + const char *description, + const char *price, + unsigned int http_status) +{ + return TALER_TESTING_cmd_merchant_post_products2 ( + label, + merchant_url, + product_id, + description, + json_pack ("{s:s}", "en", description), + "test-unit", + price, + "", + json_array (), + 4, + json_pack ("{s:s}", "street", "my street"), + GNUNET_TIME_UNIT_ZERO_TS, + http_status); +} + + +/* end of testing_api_cmd_post_products.c */ diff --git a/src/testing/test_merchant_api.c b/src/testing/test_merchant_api.c @@ -1293,6 +1293,80 @@ run (void *cls, TALER_TESTING_cmd_end () }; + struct TALER_TESTING_Command templates[] = { + TALER_TESTING_cmd_merchant_get_templates ("get-templates-empty", + merchant_url, + MHD_HTTP_OK, + NULL), + TALER_TESTING_cmd_merchant_post_templates ("post-templates-t1", + merchant_url, + "template-1", + "a template", + MHD_HTTP_NO_CONTENT), + TALER_TESTING_cmd_merchant_post_templates ("post-templates-t1-idem", + merchant_url, + "template-1", + "a template", + MHD_HTTP_NO_CONTENT), + TALER_TESTING_cmd_merchant_post_templates ("post-templates-t1-non-idem", + merchant_url, + "template-1", + "a different template", + MHD_HTTP_CONFLICT), + TALER_TESTING_cmd_merchant_get_templates ("get-templates-t1", + merchant_url, + MHD_HTTP_OK, + "post-templates-t1", + NULL), + TALER_TESTING_cmd_merchant_get_template ("get-template-t1", + merchant_url, + "template-1", + MHD_HTTP_OK, + "post-templates-t1"), + TALER_TESTING_cmd_merchant_post_templates ("post-templates-t2", + merchant_url, + "template-2", + "a template", + MHD_HTTP_NO_CONTENT), + TALER_TESTING_cmd_merchant_patch_template ("patch-templates-t2", + merchant_url, + "template-2", + "another template", + "data:image/jpeg;base64,RAWDATA", + json_pack ("{s:s}", + "summary", + "EUR:1"), + MHD_HTTP_NO_CONTENT), + TALER_TESTING_cmd_merchant_get_template ("get-template-t2", + merchant_url, + "template-2", + MHD_HTTP_OK, + "patch-templates-t2"), + TALER_TESTING_cmd_merchant_get_template ("get-template-nx", + merchant_url, + "template-nx", + MHD_HTTP_NOT_FOUND, + NULL), + TALER_TESTING_cmd_merchant_patch_template ("patch-templates-t3-nx", + merchant_url, + "template-3", + "nx updated template", + "data:image/jpeg;base64,RAWDATA", + json_pack ("{s:s}", + "summary", + "EUR:1"), + MHD_HTTP_NOT_FOUND), + TALER_TESTING_cmd_merchant_delete_template ("get-templates-empty", + merchant_url, + "t1", + MHD_HTTP_NOT_FOUND), + TALER_TESTING_cmd_merchant_delete_template ("get-templates-empty", + merchant_url, + "template-1", + MHD_HTTP_NO_CONTENT), + TALER_TESTING_cmd_end () + }; + struct TALER_TESTING_Command commands[] = { /* general setup */ TALER_TESTING_cmd_auditor_add ("add-auditor-OK", @@ -1643,6 +1717,8 @@ run (void *cls, tip), TALER_TESTING_cmd_batch ("auth", auth), + TALER_TESTING_cmd_batch ("templates", + templates), /** * End the suite. */ diff --git a/src/testing/test_merchant_template_creation.sh b/src/testing/test_merchant_template_creation.sh diff --git a/src/testing/testing_api_cmd_post_templates.c b/src/testing/testing_api_cmd_post_templates.c @@ -110,8 +110,6 @@ post_templates_cb (void *cls, break; case MHD_HTTP_NOT_FOUND: break; - case MHD_HTTP_CONFLICT: - break; default: GNUNET_break (0); GNUNET_log (GNUNET_ERROR_TYPE_WARNING, @@ -220,6 +218,9 @@ TALER_TESTING_cmd_merchant_post_templates2 ( { struct PostTemplatesState *tis; + GNUNET_assert ((NULL == template_contract) || + json_is_object (template_contract)); + tis = GNUNET_new (struct PostTemplatesState); tis->merchant_url = merchant_url; tis->template_id = template_id; @@ -254,7 +255,7 @@ TALER_TESTING_cmd_merchant_post_templates (const char *label, template_id, template_description, "", - json_pack ("merchant 1", "5e", "minimum 10"), + json_pack ("{s:s}", "merchant", "Pay"), http_status); }