diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-12-09 21:19:33 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-12-09 21:19:33 +0100 |
commit | 16e2cd8d447244996154f70c8f18f7ea5bf964ff (patch) | |
tree | 2892f41e0bafafdfd5a107c23be549198449a099 /src/bank-lib/test_bank_interpreter.c | |
parent | 1c3863f5fd03efd0d86ec6831297b508742bb862 (diff) |
switch auth based on account number in test
Diffstat (limited to 'src/bank-lib/test_bank_interpreter.c')
-rw-r--r-- | src/bank-lib/test_bank_interpreter.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/bank-lib/test_bank_interpreter.c b/src/bank-lib/test_bank_interpreter.c index 8f7abf057..0dfc4c401 100644 --- a/src/bank-lib/test_bank_interpreter.c +++ b/src/bank-lib/test_bank_interpreter.c @@ -779,6 +779,18 @@ interpreter_run (void *cls) return; } GNUNET_break (NULL != cmd->details.admin_add_incoming.subject); + switch (cmd->details.admin_add_incoming.debit_account_no) + { + case 1: + auth.details.basic.username = "Bank"; + break; + case 2: + auth.details.basic.username = "Exchange"; + break; + default: + GNUNET_break (0); + break; + } cmd->details.admin_add_incoming.aih = TALER_BANK_admin_add_incoming (is->ctx, "http://localhost:8080", @@ -814,6 +826,18 @@ interpreter_run (void *cls) rowid = ref->details.admin_add_incoming.row_id; else rowid = UINT64_MAX; + switch (cmd->details.history.account_number) + { + case 1: + auth.details.basic.username = "Bank"; + break; + case 2: + auth.details.basic.username = "Exchange"; + break; + default: + GNUNET_break (0); + break; + } cmd->details.history.hh = TALER_BANK_history (is->ctx, "http://localhost:8080", @@ -879,6 +903,18 @@ interpreter_run (void *cls) cmd->details.reject.cmd_ref); GNUNET_assert (NULL != ref); GNUNET_assert (TBI_OC_ADMIN_ADD_INCOMING == ref->oc); + switch (ref->details.admin_add_incoming.debit_account_no) + { + case 1: + auth.details.basic.username = "Bank"; + break; + case 2: + auth.details.basic.username = "Exchange"; + break; + default: + GNUNET_break (0); + break; + } cmd->details.reject.rh = TALER_BANK_reject (is->ctx, "http://localhost:8080", |