diff options
Diffstat (limited to 'src/testing/testing_api_cmd_policy_store.c')
-rw-r--r-- | src/testing/testing_api_cmd_policy_store.c | 40 |
1 files changed, 14 insertions, 26 deletions
diff --git a/src/testing/testing_api_cmd_policy_store.c b/src/testing/testing_api_cmd_policy_store.c index 4b96472..edc753d 100644 --- a/src/testing/testing_api_cmd_policy_store.c +++ b/src/testing/testing_api_cmd_policy_store.c @@ -3,16 +3,16 @@ Copyright (C) 2014-2019 Anastasis SARL ANASTASIS is free software; you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as + 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. ANASTASIS 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 Affero General Public License for more details. + GNU General Public License for more details. - You should have received a copy of the GNU Affero General Public + You should have received a copy of the GNU General Public License along with ANASTASIS; see the file COPYING. If not, see <http://www.gnu.org/licenses/> */ @@ -139,13 +139,9 @@ policy_store_cb (void *cls, pss->pso = NULL; if (ud->http_status != pss->http_status) { - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Unexpected response code %u to command %s in %s:%u\n", - ud->http_status, - pss->is->commands[pss->is->ip].label, - __FILE__, - __LINE__); - TALER_TESTING_interpreter_fail (pss->is); + TALER_TESTING_unexpected_status (pss->is, + ud->http_status, + pss->http_status); return; } switch (ud->us) @@ -229,7 +225,6 @@ policy_store_run (void *cls, if (GNUNET_OK != ANASTASIS_TESTING_get_trait_account_priv (ref, - 0, &priv)) { GNUNET_break (0); @@ -243,7 +238,6 @@ policy_store_run (void *cls, if (GNUNET_OK != ANASTASIS_TESTING_get_trait_account_pub (ref, - 0, &pub)) { GNUNET_break (0); @@ -257,7 +251,6 @@ policy_store_run (void *cls, if (GNUNET_OK != ANASTASIS_TESTING_get_trait_payment_secret (ref, - 0, &ps)) { GNUNET_break (0); @@ -279,11 +272,12 @@ policy_store_run (void *cls, pss->recovery_data_size, &pss->curr_hash); pss->pso = ANASTASIS_policy_store ( - is->ctx, + TALER_TESTING_interpreter_get_context (is), pss->anastasis_url, &pss->anastasis_priv, pss->recovery_data, pss->recovery_data_size, + "metadata", strlen ("metadata"), (0 != (ANASTASIS_TESTING_PSO_REQUEST_PAYMENT & pss->psopt)), pss->payment_secret_set ? &pss->payment_secret_request : NULL, GNUNET_TIME_UNIT_ZERO, @@ -341,18 +335,12 @@ policy_store_traits (void *cls, { struct PolicyStoreState *pss = cls; struct TALER_TESTING_Trait traits[] = { - TALER_TESTING_make_trait_claim_token (0, - &pss->claim_token), - TALER_TESTING_make_trait_order_id (0, - pss->order_id), - ANASTASIS_TESTING_make_trait_hash (0, - &pss->curr_hash), - ANASTASIS_TESTING_make_trait_account_pub (0, - &pss->anastasis_pub), - ANASTASIS_TESTING_make_trait_account_priv (0, - &pss->anastasis_priv), - ANASTASIS_TESTING_make_trait_payment_secret (0, - &pss->payment_secret_response), + TALER_TESTING_make_trait_claim_token (&pss->claim_token), + TALER_TESTING_make_trait_order_id (pss->order_id), + ANASTASIS_TESTING_make_trait_hash (&pss->curr_hash), + ANASTASIS_TESTING_make_trait_account_pub (&pss->anastasis_pub), + ANASTASIS_TESTING_make_trait_account_priv (&pss->anastasis_priv), + ANASTASIS_TESTING_make_trait_payment_secret (&pss->payment_secret_response), TALER_TESTING_trait_end () }; |