Commit Graph

418 Commits

Author SHA1 Message Date
Marcello Stanisci
566ad4f0b5
polish track CMD 2018-07-02 11:49:44 +02:00
Marcello Stanisci
ba711d7cd9
polish refresh CMD 2018-07-02 11:39:29 +02:00
Marcello Stanisci
e7d9187c12
polish refresh CMD 2018-07-02 11:38:30 +02:00
Marcello Stanisci
562b2cd180
Addressing #5332 2018-07-02 11:13:28 +02:00
Marcello Stanisci
bfdd05196b
fix memory leak 2018-06-29 15:28:05 +02:00
Marcello Stanisci
124ae0d5a2
Fix #5277. 2018-06-29 15:15:07 +02:00
Marcello Stanisci
6c72d7a1a0
Address #5366.
Making sure that the exchange side of #5366
is well-behaved.
2018-06-28 11:06:48 +02:00
Marcello Stanisci
b1015a9992
Commenting last change. 2018-06-28 10:41:49 +02:00
Marcello Stanisci
48cccb62ca
Reproducing [1] as a test case.
[1] https://gnunet.org/bugs/view.php?id=5366#c13087
2018-06-28 10:38:42 +02:00
Marcello Stanisci
f033320300
Addressing #5291. 2018-06-27 16:49:23 +02:00
Marcello Stanisci
193d95bdbd
indent 2018-06-25 14:48:22 +02:00
Marcello Stanisci
09e194a400
note 2018-06-25 14:43:51 +02:00
Marcello Stanisci
6500fab93b
Splitting twisted test case into smaller CMD chunks. 2018-06-25 14:41:07 +02:00
Marcello Stanisci
886382236c
Splitting "lib" test case into smaller CMDs arrays. 2018-06-25 14:22:52 +02:00
Marcello Stanisci
402a8b42d1
explicit zeroing. 2018-06-20 23:03:08 +02:00
Marcello Stanisci
feec78dd56
Implementing #5306. 2018-06-20 22:16:24 +02:00
Marcello Stanisci
d5684648f9
Batch CMD needs to memcpy CMDs in its internal status. 2018-06-20 14:07:01 +02:00
Marcello Stanisci
3a303770b4
Meta-CMD-aware instruction pointer.
The main IP from the testing loop gets incremented
ONLY IF the command being processed is NOT a "meta" one.
Meta CMDs have their own internal IP.
2018-06-20 13:31:28 +02:00
Marcello Stanisci
1d83e01320
batch CMD skeleton + include defs. 2018-06-20 11:20:48 +02:00
Marcello Stanisci
61fecfcd6f
Put lookup logic for meta-commands. 2018-06-20 11:08:56 +02:00
Marcello Stanisci
01f933bbdc
Get rid of "@param selector". 2018-05-29 12:43:34 +02:00
Marcello Stanisci
3cb0454dc0
Commenting the main "testing" header file. 2018-05-29 12:18:18 +02:00
Marcello Stanisci
42dcf052d1
fix compilation error 2018-05-28 22:54:10 +02:00
Marcello Stanisci
7a1146f147
Commenting the remaining "lib" traits. 2018-05-28 17:23:05 +02:00
Marcello Stanisci
939c1dd6a5
Commenting the "peer key" trait. 2018-05-28 15:58:08 +02:00
Marcello Stanisci
d97260408c
Commenting the "fresh coins" trait. 2018-05-28 15:51:23 +02:00
Marcello Stanisci
027da0f1a3
Commenting the "wire" CMD. 2018-05-28 15:41:47 +02:00
Marcello Stanisci
d08d25e101
Commenting the "track"(s) CMDs. 2018-05-28 15:31:50 +02:00
Marcello Stanisci
25ca8f90ad
Commenting the "reserve status" CMD. 2018-05-28 13:45:19 +02:00
Marcello Stanisci
26be8717c5
Commenting the "signal" CMD. 2018-05-28 13:38:20 +02:00
Marcello Stanisci
12801e2a4c
Commenting the "refund" CMD. 2018-05-28 13:35:29 +02:00
Marcello Stanisci
1ecef98609
Commenting the "deposit" CMD. 2018-05-28 13:27:54 +02:00
Marcello Stanisci
9c896fe4cc
Commenting "fakebank transfer" CMDs 2018-05-28 13:05:05 +02:00
Marcello Stanisci
f7deeacb20
minor edit 2018-05-26 10:51:37 +02:00
Marcello Stanisci
a53e825714
Commenting the "aggregator" CMD 2018-05-26 10:46:45 +02:00
Marcello Stanisci
199bca5e03
Commenting the "wirewatch" CMD. 2018-05-26 10:40:58 +02:00
Marcello Stanisci
effa3db3cd
Commenting the "keyup" CMD. 2018-05-26 10:36:54 +02:00
Marcello Stanisci
69f05ae663
Commenting the "auditor sign" CMD. 2018-05-26 10:31:25 +02:00
Marcello Stanisci
cdd4294a37
Command "withdraw" CMD. 2018-05-26 10:24:33 +02:00
Marcello Stanisci
a249d583f0
Commenting the "bank check" CMD. 2018-05-25 20:22:56 +02:00
Marcello Stanisci
a93b4e9edb
Commenting the "refresh"(es) CMDs. 2018-05-25 19:58:34 +02:00
Marcello Stanisci
8ef954ef22
Commenting "payback" and "revoke" CMDs. 2018-05-25 14:34:32 +02:00
Marcello Stanisci
afb4fb5470
Commenting the "check keys" CMD. 2018-05-25 14:15:58 +02:00
Marcello Stanisci
dbf6e123d0
aesthetic change. 2018-05-25 12:09:02 +02:00
Marcello Stanisci
fffaf61717
set right expected http code. 2018-05-18 17:15:41 +02:00
Marcello Stanisci
b86a3580f8
Make a "payback" bit appear into the history. 2018-05-18 17:04:36 +02:00
Marcello Stanisci
5019bd6914
Ask to withdraw on a expired reserve. 2018-05-18 16:54:36 +02:00
Marcello Stanisci
76381cf083
double-check reserve is well-behaved. 2018-05-18 10:57:41 +02:00
Marcello Stanisci
8ad907782d
Withdraw after payback.
This triggers the TALER_EXCHANGEDB_RO_PAYBACK_COIN
case within the withdraw_transaction() handler.
2018-05-18 10:50:27 +02:00
Marcello Stanisci
39a9045319
comment 2018-05-17 16:00:14 +02:00
Marcello Stanisci
381ac75ae0
Trigger conflicting refunds 2018-05-17 15:50:50 +02:00
Marcello Stanisci
5e1178a74b
Trigger double(-successful) refund. 2018-05-17 15:35:45 +02:00
Marcello Stanisci
c0c5bd3ba7
Trigger refund fee to low 2018-05-17 15:30:27 +02:00
Marcello Stanisci
1b5dfe20c3
Trigger refund insufficient funds 2018-05-17 15:24:48 +02:00
Marcello Stanisci
2fff7d8f3a
Trigger /refund currency missmatch the right way. 2018-05-17 14:30:02 +02:00
Marcello Stanisci
e94e8c34c5
Trigger deposit to refund not found 2018-05-17 13:07:56 +02:00
Marcello Stanisci
b898399507
Trigger invalid merchant signature on refund 2018-05-17 10:37:06 +02:00
Marcello Stanisci
920462e88c
Trigger above-amount error 2018-05-17 10:34:52 +02:00
Marcello Stanisci
e5ec16b908
trigger refund fee currency missmatch. 2018-05-17 10:30:17 +02:00
Marcello Stanisci
776f222547
Adding the refund CMD, genuine for now, to be evil-tuned. 2018-05-17 09:39:06 +02:00
Marcello Stanisci
7a1bb2b4c8
prepare ground to refund twist-tests. 2018-05-17 09:36:30 +02:00
Marcello Stanisci
8ec523afbb
Triggering 409 Conflict for /refresh/reveal 2018-05-16 13:18:23 +02:00
Marcello Stanisci
08824870e6
Triggering doubled /refresh/melt, plus prepare ground for twisting the /refresh/reveal 2018-05-14 22:32:13 +02:00
Marcello Stanisci
6a0be254cc
fix if-else logical error. 2018-05-11 15:36:48 +02:00
Marcello Stanisci
0c2851b88b
make test config files more autocomplete. 2018-05-07 12:44:36 +02:00
Marcello Stanisci
5fda47780a
fix segfault 2018-05-04 14:23:17 +02:00
Marcello Stanisci
a761baab49
Test cases.
Only check if PORT is available if exchange
serves via http.  Also get the base URL from
the config -- fixes those situations where it
is not possible to construct it as localhost:<port>.
2018-05-04 13:06:23 +02:00
Marcello Stanisci
7d2fbc4796
fix path generation. 2018-05-03 10:33:29 +02:00
Marcello Stanisci
c428702fbb
remove dead code 2018-04-26 12:52:40 +02:00
Marcello Stanisci
a9ff9a0bbe
reset auditor tables upon running tests, + upgrade "twisted" config file. 2018-04-23 17:20:14 +02:00
Marcello Stanisci
eedb4dd4ed
auditor tool to reset db tables. 2018-04-23 17:04:19 +02:00
Christian Grothoff
202827ebda
merging Florian's changes with my wire changes 2018-04-15 12:20:00 +02:00
Florian Dold
1b3bf1a001
disable /keys cherrypicking until #5315 is addressed 2018-04-06 00:58:15 +02:00
Florian Dold
b48013bd56
fix compiler warning 2018-04-04 00:14:02 +02:00
Christian Grothoff
2b0f98dd4b
report which command failed 2018-04-02 17:16:04 +02:00
Christian Grothoff
e098dbf4dc
get filename instead of get_string, nicify some strings 2018-04-02 17:10:05 +02:00
Christian Grothoff
8ebb4cda07
fix NULL termination of fee list 2018-04-02 16:35:14 +02:00
Christian Grothoff
40a64e8f0c
fix post-merge FTBFS 2018-04-02 14:34:23 +02:00
Christian Grothoff
cb55c1a3af
Changing configuration structure to enable multiple accounts.
This change enables using multiple wire plugins at the same time.
Also, we now distinguish between the wire plugin (i.e. EBICS or
taler_bank) and the wire method (i.e. SEPA or x-taler-bank) that
the wire plugin is implementing.  The "taler-bank" wire method
was renamed from "test" to "x-taler-bank".

This also changes the format of the /wire response of the exchange,
as we now need to return multiple accounts.  Note that wire fees
are specified per wire method, not per wire account.

taler-exchange-keyup now automatically signs all of the /wire
responses in the location specified by the configuration.

Account identification in wire plugins was changed to use
payto://-URLs instead of method-specific JSON fields.  Signing
and validation of /wire responses was moved from each wire
plugin to a generic validation method in libtalerutil (crypto)
or libtalerjson (for JSON-formatted inputs).
Convenience methods were added to generate JSON for wire accounts
(salting, signing).

Various section and option names were adjusted to streamline the
configuration and make it more consistent overall.  Documentation
was updated as well.
2018-04-02 14:29:44 +02:00
Marcello Stanisci
3e191f3b08
still on gentle twister termination. 2018-03-26 21:43:25 +02:00
Marcello Stanisci
0056cb6d09
addressing leaks. 2018-03-21 17:13:27 +01:00
Marcello Stanisci
9cc813adec
build exchange url at (withdraw) command creation. 2018-03-21 17:13:27 +01:00
Marcello Stanisci
8fe985c767
address leaks. 2018-03-21 17:13:27 +01:00
Marcello Stanisci
7d4d3b3e9d
address leaks. 2018-03-21 17:13:26 +01:00
Marcello Stanisci
e364aa76e1
fix segfault. 2018-03-19 18:47:52 +01:00
Marcello Stanisci
4eb9bcfb0f
format output 2018-03-17 02:05:48 +01:00
Marcello Stanisci
094af3b679
Twisted tests scaffold. 2018-03-17 02:05:45 +01:00
Marcello Stanisci
a360d9c6a0
Test cases connect to the exchange via the base URL
they get from exchange/BASE_URL config value.  This way, the
twister can be easily put in the middle by making it
listen on the same port specified after the : of the
exchange/BASE_URL.
2018-02-28 16:59:39 +01:00
Marcello Stanisci
f1f5377003
static 2018-02-28 16:25:00 +01:00
Marcello Stanisci
ed8dfac6db
helpers return exchange base url from config. 2018-02-28 16:15:18 +01:00
Marcello Stanisci
663f26a1a2
fix reject test command. 2018-02-27 22:55:18 +01:00
Christian Grothoff
cfab4194f0
use more 'static' where applicable, use GNUNET_log instead of fprintf 2018-02-27 22:22:18 +01:00
Marcello Stanisci
b593d416d6
Bank-lib tests, using the new (libraries-based) style. 2018-02-26 14:12:46 +01:00
Marcello Stanisci
8d5cc9f550
denom pub trait made 'const' 2018-02-21 16:58:18 +01:00
Marcello Stanisci
1e6efdc5f0
no need for a "hash trait" here. Removing code. 2018-02-21 15:13:58 +01:00
Marcello Stanisci
3c9757a163
actually loading config 2018-02-21 12:41:22 +01:00
Marcello Stanisci
377f35fd7d
adding command to wire transfer to exchange by
reading a merchant instance's (reserve tip) private
key in order to construct the subject.
2018-02-21 12:23:45 +01:00
Marcello Stanisci
b09bd97c3b
test command "fakebank transfer"
takes exchange url in arguments
2018-02-21 09:56:49 +01:00
Marcello Stanisci
6ac3c6cd4d
bank-check test cmd offers exchange url as trait. 2018-02-19 15:38:21 +01:00
Marcello Stanisci
76ba8f1291
fix reserve creation with reference 2018-02-17 23:41:08 +01:00
Marcello Stanisci
844f39c85e
hash and public key traits. 2018-02-17 15:39:44 +01:00
Marcello Stanisci
d20c94d870
indent 2018-02-16 12:05:42 +01:00
Marcello Stanisci
7ffc6d0fb9
hash code trait 2018-02-16 11:59:32 +01:00
Marcello Stanisci
513a22c344
offering amount _objects_ as traits (a string version of
it was already implemented).  "Withdraw" command uses it.
2018-02-16 10:57:23 +01:00
Marcello Stanisci
63109b6910
paste leftover 2018-02-15 17:23:29 +01:00
Marcello Stanisci
d78f66d5e4
adding "order id" trait 2018-02-15 16:36:00 +01:00
Marcello Stanisci
5b1e17617f
offer url trait 2018-02-14 12:46:01 +01:00
Marcello Stanisci
fe6960cce8
Implement new traits-based tests. 2018-02-12 16:12:07 +01:00
Florian Dold
e318edb5e5
use url instead of uri consistently 2018-01-30 01:38:04 +01:00
Christian Grothoff
bb39c62dff
add missing cmd file 2018-01-21 20:16:14 +01:00
Christian Grothoff
de092c2c2b
make fakebank_url more robust 2018-01-21 20:10:05 +01:00
Christian Grothoff
652bb0f9c4
finish simplifying main by adding more helpers and macros 2018-01-21 19:57:09 +01:00
Christian Grothoff
8013c4b66a
use CONFIG_FILE macro 2018-01-21 19:25:12 +01:00
Christian Grothoff
3f930c0f6a
more wire transfer variants 2018-01-21 19:21:45 +01:00
Christian Grothoff
a252daa6a1
factor out more helpers 2018-01-21 19:11:27 +01:00
Christian Grothoff
d09beecc8f
integrate sigpipe with ain loop 2018-01-21 18:49:47 +01:00
Christian Grothoff
41cb8b4c51
integrate sigpipe with ain loop 2018-01-21 18:46:29 +01:00
Christian Grothoff
673e418c76
forgotten file 2018-01-21 18:45:19 +01:00
Christian Grothoff
bba0ec72fa
finish new withdraw command implementation 2018-01-21 16:27:58 +01:00
Christian Grothoff
6ba7747ac3
more traits 2018-01-21 16:01:08 +01:00
Christian Grothoff
82b0eda3ef
new test interpreter architecture, first draft 2018-01-21 15:39:48 +01:00
Christian Grothoff
5c3d25eb29
implement #5254 2018-01-18 16:55:16 +01:00
Christian Grothoff
bc7957f393
fix fakebank memory leak 2018-01-16 13:11:35 +01:00
Christian Grothoff
b31d803c16
add timestamp for /reserve/status deposit events 2018-01-15 15:19:31 +01:00
Christian Grothoff
57eb85976b
enable test for #5234 2018-01-04 11:57:11 +01:00
Christian Grothoff
77a58673ef
comment out extended test again 2018-01-04 10:39:13 +01:00
Christian Grothoff
5587732f52
fix auditor to properly verify wire fee signatures and more gracefully handle arithmetic amount issue 2018-01-04 00:41:19 +01:00
Christian Grothoff
dad63db5f9
extending test logic to detect refund issue (commented out for now) 2018-01-02 14:05:03 +01:00
Christian Grothoff
ff0d4bb6eb
add TALER_EXCHANGE_refund2, make sure fee test initializes all amounts; update ChangeLog 2018-01-01 23:28:19 +01:00
Christian Grothoff
4f2ad1051b
change 'f' to 'contribution' in /deposit 2018-01-01 22:28:49 +01:00
Christian Grothoff
229907c6e2
implement taler-bank-transfer, fixes #5195 2017-12-14 15:33:10 +01:00
Christian Grothoff
f7c9de73e1
remove _admin APIs from libtalerexchange 2017-12-14 13:42:25 +01:00
Christian Grothoff
c182b960f8
remove _admin APIs from libtalerexchange 2017-12-14 13:42:07 +01:00
Christian Grothoff
749c02fe37
bump protocol version of C client, we do support the new refresh 2017-12-10 19:03:11 +01:00
Christian Grothoff
6623afa2a3
add testcase for #5077 (passes), start to reduce use of exchange's admin/add/incoming (#5172, more to come) 2017-12-10 16:02:03 +01:00
Christian Grothoff
d36de3bdd6
add wirewatch command to testcase (not yet active), for #5077 2017-12-10 14:25:15 +01:00
Christian Grothoff
ff452e6033
check find_pk return value in test 2017-12-10 00:25:43 +01:00
Christian Grothoff
499247a480
fixing #5178 2017-11-29 20:23:08 +01:00
Christian Grothoff
6b4313da61
fix stupid ordering issue after refactoring 2017-10-31 22:59:34 +01:00
Christian Grothoff
beeece1d6a
add TALER_EXCHANGE_reserve_withdraw2 function for easy withdrawal of tips 2017-10-31 14:45:15 +01:00
Christian Grothoff
2f2930f1ba
major API refactoring, adding planchet generation and coin extraction APIs to the Taler crypto library, thereby simplifying code in withdraw, refresh, tipping, payback and testcases; slight API incompatibilities to previous versions are introduced 2017-10-31 14:02:54 +01:00
Christian Grothoff
ec8146de92
rename: TALER_setup_planchet -> TALER_planchet_setup_refresh 2017-10-31 12:44:17 +01:00
Christian Grothoff
a491a4709a
rename: TALER_FreshCoinP -> TALER_PlanchetSecretsP, and TALER_setup_fresh_coin -> TALER_setup_planchet 2017-10-31 12:38:14 +01:00
Christian Grothoff
9807e5c50c
releasing v0.4.0 2017-10-18 15:21:06 +02:00
Christian Grothoff
15e27abed5
doh, do not try to clean up after allocation failure 2017-10-06 22:10:32 +02:00
Christian Grothoff
a7746c8153
add assertion to be more defensive against buffer overflow (cannot happen, but this better protects against future changes) 2017-10-06 21:32:33 +02:00
Christian Grothoff
dc883f8556
add assertion to be more defensive against buffer overflow (cannot happen, but this better protects against future changes) 2017-10-06 21:27:58 +02:00
Christian Grothoff
06f5621fba
better logging if IBAN validation fails, also avoid potentially unbounded stack allocation 2017-10-06 21:04:56 +02:00
Christian Grothoff
dbab0c6587
check return value from TALER_amount_get_zero 2017-10-06 20:54:42 +02:00
Christian Grothoff
2f715c27f8
check return value from TALER_JSON_hash 2017-10-06 20:02:28 +02:00