merchant

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

meson.build (11911B)


      1 # This build file is in the public domain
      2 
      3 
      4 check_SCRIPTS = [
      5     'test_merchant_auth_legacy',
      6     'test_merchant_fountains',
      7     'test_merchant_instance_auth',
      8     'test_merchant_instance_creation',
      9     'test_merchant_instance_response',
     10     'test_merchant_instance_purge',
     11     'test_merchant_kyc',
     12     'test_merchant_mfa',
     13     'test_merchant_order_creation',
     14     'test_merchant_order_refund',
     15     'test_merchant_order_autocleanup',
     16     'test_merchant_product_creation',
     17     'test_merchant_signup_email',
     18     'test_merchant_statistics',
     19     'test_merchant_templates',
     20     'test_merchant_depositcheck_confirmation',
     21     'test_merchant_transfer_tracking',
     22     'test_merchant_units',
     23     'test-merchant-walletharness',
     24     'test_merchant_wirewatch',
     25 ]
     26 
     27 foreach f : check_SCRIPTS
     28     f_sh = '@0@.sh'.format(f)
     29     s = configure_file(input: f_sh, output: f_sh, copy: true)
     30     test(
     31         f,
     32         s,
     33         workdir: meson.current_build_dir(),
     34         suite: ['testing', 'integrationtests'],
     35         is_parallel: false,
     36         timeout: 600,
     37     )
     38 
     39 endforeach
     40 
     41 
     42 libtalermerchanttesting_la_SOURCES = [
     43     'testing_api_cmd_config.c',
     44     'testing_api_cmd_abort_order.c',
     45     'testing_api_cmd_claim_order.c',
     46     'testing_api_cmd_check_order_external.c',
     47     'testing_api_cmd_collect_order.c',
     48     'testing_api_cmd_depositcheck.c',
     49     'testing_api_cmd_get_instance.c',
     50     'testing_api_cmd_get_instances.c',
     51     'testing_api_cmd_get_orders.c',
     52     'testing_api_cmd_get_otp_device.c',
     53     'testing_api_cmd_get_otp_devices.c',
     54     'testing_api_cmd_get_product.c',
     55     'testing_api_cmd_get_product_image.c',
     56     'testing_api_cmd_get_products.c',
     57     'testing_api_cmd_get_statisticsamount.c',
     58     'testing_api_cmd_get_statisticscounter.c',
     59     'testing_api_cmd_get_transfers.c',
     60     'testing_api_cmd_get_templates.c',
     61     'testing_api_cmd_get_template.c',
     62     'testing_api_cmd_get_unit.c',
     63     'testing_api_cmd_get_units.c',
     64     'testing_api_cmd_get_webhooks.c',
     65     'testing_api_cmd_get_webhook.c',
     66     'testing_api_cmd_delete_account.c',
     67     'testing_api_cmd_delete_instance.c',
     68     'testing_api_cmd_delete_order.c',
     69     'testing_api_cmd_delete_otp_device.c',
     70     'testing_api_cmd_delete_product.c',
     71     'testing_api_cmd_delete_template.c',
     72     'testing_api_cmd_delete_unit.c',
     73     'testing_api_cmd_delete_webhook.c',
     74     'testing_api_cmd_delete_transfer.c',
     75     'testing_api_cmd_exec_donaukeyupdate.c',
     76     'testing_api_cmd_forget_order.c',
     77     'testing_api_cmd_kyc_get.c',
     78     'testing_api_cmd_lock_product.c',
     79     'testing_api_cmd_instance_auth.c',
     80     'testing_api_cmd_instance_token.c',
     81     'testing_api_cmd_merchant_get_order.c',
     82     'testing_api_cmd_patch_instance.c',
     83     'testing_api_cmd_patch_otp_device.c',
     84     'testing_api_cmd_patch_product.c',
     85     'testing_api_cmd_patch_template.c',
     86     'testing_api_cmd_patch_unit.c',
     87     'testing_api_cmd_patch_webhook.c',
     88     'testing_api_cmd_pay_order.c',
     89     'testing_api_cmd_post_account.c',
     90     'testing_api_cmd_post_instances.c',
     91     'testing_api_cmd_post_orders_paid.c',
     92     'testing_api_cmd_post_orders.c',
     93     'testing_api_cmd_post_otp_devices.c',
     94     'testing_api_cmd_post_categories.c',
     95     'testing_api_cmd_post_products.c',
     96     'testing_api_cmd_post_transfers.c',
     97     'testing_api_cmd_post_templates.c',
     98     'testing_api_cmd_post_units.c',
     99     'testing_api_cmd_post_fountains.c',
    100     'testing_api_cmd_fountain_withdraw.c',
    101     'testing_api_cmd_post_tokenfamilies.c',
    102     'testing_api_cmd_post_using_templates.c',
    103     'testing_api_cmd_post_webhooks.c',
    104     'testing_api_cmd_refund_external.c',
    105     'testing_api_cmd_refund_order.c',
    106     'testing_api_cmd_tme.c',
    107     'testing_api_cmd_wallet_get_order.c',
    108     'testing_api_cmd_wallet_get_template.c',
    109     'testing_api_cmd_wallet_post_orders_refund.c',
    110     'testing_api_cmd_webhook.c',
    111     'testing_api_cmd_testserver.c',
    112     'testing_api_cmd_checkserver.c',
    113     'testing_api_helpers.c',
    114     'testing_api_traits.c',
    115     'testing_api_cmd_post_donau_charity_merchant.c',
    116     'testing_api_cmd_post_donau_instances.c',
    117     'testing_api_cmd_get_donau_instances.c',
    118     'testing_api_cmd_delete_donau_instances.c',
    119 ]
    120 
    121 
    122 libtalermerchanttesting = library(
    123     'talermerchanttesting',
    124     libtalermerchanttesting_la_SOURCES,
    125     soversion: solibversions['libtalermerchanttesting']['soversion'],
    126     version: solibversions['libtalermerchanttesting']['soversion'],
    127     install_rpath: rpath_option,
    128     dependencies: [
    129         donau_dep,
    130         donauutil_dep,
    131         libtalermerchant_dep,
    132         donautesting_dep,
    133         talerexchange_dep,
    134         talermhd_dep,
    135         talerbank_dep,
    136         talertesting_dep,
    137         talerjson_dep,
    138         talerutil_dep,
    139         gnunetutil_dep,
    140         gnunetcurl_dep,
    141         gnunetjson_dep,
    142         json_dep,
    143         mhd_dep,
    144         m_dep,
    145     ],
    146     include_directories: [incdir, configuration_inc],
    147     install: true,
    148     install_dir: get_option('libdir'),
    149 )
    150 
    151 libtalermerchanttesting_dep = declare_dependency(
    152     link_with: libtalermerchanttesting,
    153 )
    154 pkg.generate(
    155     libtalermerchanttesting,
    156     url: 'https://taler.net',
    157     description: 'GNU Taler merchant testing library',
    158 )
    159 
    160 if talerfakebank_dep.found()
    161     if twister_dep.found()
    162         test_merchant_api_twisted_cs = executable(
    163             'test_merchant_api_twisted_cs',
    164             ['test_merchant_api_twisted.c'],
    165             dependencies: [
    166                 talertesting_dep,
    167                 libtalermerchant_dep,
    168                 libtalermerchantutil_dep,
    169                 libtalermerchantdb_dep,
    170                 libtalermerchanttesting_dep,
    171                 talertwistertesting_dep,
    172                 twister_dep,
    173                 talerexchange_dep,
    174                 talerbank_dep,
    175                 talerfakebank_dep,
    176                 talerjson_dep,
    177                 talerutil_dep,
    178                 json_dep,
    179                 gcrypt_dep,
    180                 gnunetutil_dep,
    181                 gnunetjson_dep,
    182                 gnunetcurl_dep,
    183             ],
    184             include_directories: [incdir, configuration_inc],
    185             build_by_default: false,
    186             install: false,
    187         )
    188         test(
    189             'test_merchant_api_twisted_cs',
    190             test_merchant_api_twisted_cs,
    191             workdir: meson.current_build_dir(),
    192             suite: ['testing', 'integrationtests'],
    193             is_parallel: false,
    194             timeout: 300,
    195         )
    196 
    197 
    198         test_merchant_api_twisted_rsa = executable(
    199             'test_merchant_api_twisted_rsa',
    200             ['test_merchant_api_twisted.c'],
    201             dependencies: [
    202                 talertesting_dep,
    203                 libtalermerchant_dep,
    204                 libtalermerchantutil_dep,
    205                 libtalermerchantdb_dep,
    206                 libtalermerchanttesting_dep,
    207                 talertwistertesting_dep,
    208                 twister_dep,
    209                 talerexchange_dep,
    210                 talerbank_dep,
    211                 talerfakebank_dep,
    212                 talerjson_dep,
    213                 talerutil_dep,
    214                 json_dep,
    215                 gcrypt_dep,
    216                 gnunetutil_dep,
    217                 gnunetjson_dep,
    218                 gnunetcurl_dep,
    219             ],
    220             include_directories: [incdir, configuration_inc],
    221             build_by_default: false,
    222             install: false,
    223         )
    224         test(
    225             'test_merchant_api_twisted_rsa',
    226             test_merchant_api_twisted_rsa,
    227             workdir: meson.current_build_dir(),
    228             suite: ['testing', 'integrationtests'],
    229             is_parallel: false,
    230             timeout: 300,
    231         )
    232 
    233     endif
    234 
    235     test_merchant_api_cs = executable(
    236         'test_merchant_api_cs',
    237         ['test_merchant_api.c'],
    238         dependencies: [
    239             donautesting_dep,
    240             talertesting_dep,
    241             libtalermerchant_dep,
    242             libtalermerchantutil_dep,
    243             libtalermerchantdb_dep,
    244             libtalermerchanttesting_dep,
    245             talerexchange_dep,
    246             talerbank_dep,
    247             talerfakebank_dep,
    248             talerjson_dep,
    249             talerutil_dep,
    250             json_dep,
    251             gcrypt_dep,
    252             gnunetutil_dep,
    253             gnunetjson_dep,
    254             gnunetcurl_dep,
    255         ],
    256         include_directories: [incdir, configuration_inc],
    257         build_by_default: false,
    258         install: false,
    259     )
    260     test(
    261         'test_merchant_api_cs',
    262         test_merchant_api_cs,
    263         workdir: meson.current_build_dir(),
    264         suite: ['testing', 'integrationtests'],
    265         is_parallel: false,
    266         timeout: 300,
    267     )
    268 
    269     test_merchant_api_rsa = executable(
    270         'test_merchant_api_rsa',
    271         ['test_merchant_api.c'],
    272         dependencies: [
    273             donautesting_dep,
    274             talertesting_dep,
    275             libtalermerchant_dep,
    276             libtalermerchantutil_dep,
    277             libtalermerchantdb_dep,
    278             libtalermerchanttesting_dep,
    279             talerexchange_dep,
    280             talerbank_dep,
    281             talerfakebank_dep,
    282             talerjson_dep,
    283             talerutil_dep,
    284             json_dep,
    285             gcrypt_dep,
    286             gnunetutil_dep,
    287             gnunetjson_dep,
    288             gnunetcurl_dep,
    289         ],
    290         include_directories: [incdir, configuration_inc],
    291         build_by_default: false,
    292         install: false,
    293     )
    294     test(
    295         'test_merchant_api_rsa',
    296         test_merchant_api_rsa,
    297         workdir: meson.current_build_dir(),
    298         suite: ['testing', 'integrationtests'],
    299         is_parallel: false,
    300         timeout: 300,
    301     )
    302 
    303     test_reconciliation_rsa = executable(
    304         'test_reconciliation_rsa',
    305         ['test_reconciliation.c'],
    306         dependencies: [
    307             talertesting_dep,
    308             libtalermerchant_dep,
    309             libtalermerchantutil_dep,
    310             libtalermerchantdb_dep,
    311             libtalermerchanttesting_dep,
    312             talerexchange_dep,
    313             talerbank_dep,
    314             talerfakebank_dep,
    315             talerjson_dep,
    316             talerutil_dep,
    317             json_dep,
    318             gcrypt_dep,
    319             gnunetutil_dep,
    320             gnunetjson_dep,
    321             gnunetcurl_dep,
    322         ],
    323         include_directories: [incdir, configuration_inc],
    324         build_by_default: false,
    325         install: false,
    326     )
    327     test(
    328         'test_reconciliation_rsa',
    329         test_reconciliation_rsa,
    330         workdir: meson.current_build_dir(),
    331         suite: ['testing', 'integrationtests'],
    332         is_parallel: false,
    333     )
    334 
    335     test_kyc_api = executable(
    336         'test_kyc_api',
    337         ['test_kyc_api.c'],
    338         dependencies: [
    339             talertesting_dep,
    340             libtalermerchant_dep,
    341             libtalermerchantutil_dep,
    342             libtalermerchantdb_dep,
    343             libtalermerchanttesting_dep,
    344             talerexchange_dep,
    345             talerbank_dep,
    346             talerfakebank_dep,
    347             talerjson_dep,
    348             talerutil_dep,
    349             json_dep,
    350             gcrypt_dep,
    351             gnunetutil_dep,
    352             gnunetjson_dep,
    353             gnunetcurl_dep,
    354         ],
    355         include_directories: [incdir, configuration_inc],
    356         build_by_default: false,
    357         install: false,
    358     )
    359     test(
    360         'test_kyc_api',
    361         test_kyc_api,
    362         workdir: meson.current_build_dir(),
    363         suite: ['testing', 'integrationtests'],
    364         is_parallel: false,
    365         timeout: 300,
    366     )
    367 
    368 
    369 endif
    370 
    371 EXTRA_DIST = [
    372     'setup.sh',
    373     'test_key_rotation.conf',
    374     'test_kyc_api.conf',
    375     'test_merchant_api.conf',
    376     'test_merchant_api-cs.conf',
    377     'test_merchant_api-rsa.conf',
    378     'test_merchant_api_twisted-cs.conf',
    379     'test_merchant_api_twisted-rsa.conf',
    380     'test_merchant_api_proxy_merchant.conf',
    381     'test_merchant_api_proxy_exchange.conf',
    382     'test_merchant_mfa.conf',
    383     'test_merchant_auth_legacy.conf',
    384     'test_email_helper.sh',
    385     'test_sms_helper.sh',
    386     'test_merchant.priv',
    387     'test_template.conf',
    388 ]
    389 foreach f : EXTRA_DIST
    390     configure_file(input: f, output: f, copy: true)
    391 endforeach