This commit is contained in:
Marcello Stanisci 2018-12-19 11:43:05 +01:00
parent b22b36a20b
commit 9c82290a1a
No known key found for this signature in database
GPG Key ID: 8D526861953F4C0F
20 changed files with 237 additions and 175 deletions

View File

@ -793,7 +793,6 @@ TALER_TESTING_cmd_bank_history
long long num_results) long long num_results)
{ {
struct HistoryState *hs; struct HistoryState *hs;
struct TALER_TESTING_Command cmd;
hs = GNUNET_new (struct HistoryState); hs = GNUNET_new (struct HistoryState);
hs->bank_url = bank_url; hs->bank_url = bank_url;
@ -803,11 +802,13 @@ TALER_TESTING_cmd_bank_history
hs->num_results = num_results; hs->num_results = num_results;
hs->ascending = ascending; hs->ascending = ascending;
cmd.label = label; struct TALER_TESTING_Command cmd = {
cmd.cls = hs; .label = label,
cmd.run = &history_run; .cls = hs,
cmd.cleanup = &history_cleanup; .run = &history_run,
cmd.traits = &history_traits; .cleanup = &history_cleanup,
.traits = &history_traits
};
return cmd; return cmd;
} }

View File

@ -200,20 +200,22 @@ TALER_TESTING_cmd_bank_reject (const char *label,
const char *deposit_reference) const char *deposit_reference)
{ {
struct RejectState *rs; struct RejectState *rs;
struct TALER_TESTING_Command cmd;
rs = GNUNET_new (struct RejectState); rs = GNUNET_new (struct RejectState);
rs->bank_url = bank_url; rs->bank_url = bank_url;
rs->deposit_reference = deposit_reference; rs->deposit_reference = deposit_reference;
cmd.cls = rs; struct TALER_TESTING_Command cmd = {
cmd.run = &reject_run; .cls = rs,
cmd.cleanup = &reject_cleanup; .run = &reject_run,
cmd.label = label; .cleanup = &reject_cleanup,
cmd.traits = &reject_traits; .label = label,
.traits = &reject_traits
};
return cmd; return cmd;
} }
/* end of testing_api_cmd_reject.c */ /* end of testing_api_cmd_reject.c */

View File

@ -253,7 +253,6 @@ TALER_TESTING_cmd_check_bank_transfer
uint64_t credit_account) uint64_t credit_account)
{ {
struct BankCheckState *bcs; struct BankCheckState *bcs;
struct TALER_TESTING_Command cmd;
bcs = GNUNET_new (struct BankCheckState); bcs = GNUNET_new (struct BankCheckState);
bcs->exchange_base_url = exchange_base_url; bcs->exchange_base_url = exchange_base_url;
@ -263,11 +262,13 @@ TALER_TESTING_cmd_check_bank_transfer
bcs->deposit_reference = NULL; bcs->deposit_reference = NULL;
cmd.label = label; struct TALER_TESTING_Command cmd = {
cmd.cls = bcs; .label = label,
cmd.run = &check_bank_transfer_run; .cls = bcs,
cmd.cleanup = &check_bank_transfer_cleanup; .run = &check_bank_transfer_run,
cmd.traits = &check_bank_transfer_traits; .cleanup = &check_bank_transfer_cleanup,
.traits = &check_bank_transfer_traits
};
return cmd; return cmd;
} }

View File

@ -157,7 +157,6 @@ struct TALER_TESTING_Command
TALER_TESTING_cmd_batch (const char *label, TALER_TESTING_cmd_batch (const char *label,
struct TALER_TESTING_Command *batch) struct TALER_TESTING_Command *batch)
{ {
struct TALER_TESTING_Command cmd;
struct BatchState *bs; struct BatchState *bs;
unsigned int i; unsigned int i;
@ -175,11 +174,13 @@ TALER_TESTING_cmd_batch (const char *label,
batch, batch,
sizeof (struct TALER_TESTING_Command) * i); sizeof (struct TALER_TESTING_Command) * i);
cmd.cls = bs; struct TALER_TESTING_Command cmd = {
cmd.label = label; .cls = bs,
cmd.run = &batch_run; .label = label,
cmd.cleanup = &batch_cleanup; .run = &batch_run,
cmd.traits = &batch_traits; .cleanup = &batch_cleanup,
.traits = &batch_traits
};
return cmd; return cmd;
} }

View File

@ -143,15 +143,18 @@ TALER_TESTING_cmd_check_keys
unsigned int num_denom_keys) unsigned int num_denom_keys)
{ {
struct CheckKeysState *cks; struct CheckKeysState *cks;
struct TALER_TESTING_Command cmd;
cks = GNUNET_new (struct CheckKeysState); cks = GNUNET_new (struct CheckKeysState);
cks->generation = generation; cks->generation = generation;
cks->num_denom_keys = num_denom_keys; cks->num_denom_keys = num_denom_keys;
cmd.cls = cks;
cmd.label = label; struct TALER_TESTING_Command cmd = {
cmd.run = &check_keys_run; .cls = cks,
cmd.cleanup = &check_keys_cleanup; .label = label,
.run = &check_keys_run,
.cleanup = &check_keys_cleanup
};
return cmd; return cmd;
} }

View File

@ -519,7 +519,6 @@ TALER_TESTING_cmd_deposit
const char *amount, const char *amount,
unsigned int expected_response_code) unsigned int expected_response_code)
{ {
struct TALER_TESTING_Command cmd = {0}; /* need explicit zeroing..*/
struct DepositState *ds; struct DepositState *ds;
ds = GNUNET_new (struct DepositState); ds = GNUNET_new (struct DepositState);
@ -543,11 +542,13 @@ TALER_TESTING_cmd_deposit
ds->amount = amount; ds->amount = amount;
ds->expected_response_code = expected_response_code; ds->expected_response_code = expected_response_code;
cmd.cls = ds; struct TALER_TESTING_Command cmd = {
cmd.label = label; .cls = ds,
cmd.run = &deposit_run; .label = label,
cmd.cleanup = &deposit_cleanup; .run = &deposit_run,
cmd.traits = &deposit_traits; .cleanup = &deposit_cleanup,
.traits = &deposit_traits
};
return cmd; return cmd;
} }

View File

@ -147,16 +147,19 @@ struct TALER_TESTING_Command
TALER_TESTING_cmd_exec_aggregator (const char *label, TALER_TESTING_cmd_exec_aggregator (const char *label,
const char *config_filename) const char *config_filename)
{ {
struct TALER_TESTING_Command cmd;
struct AggregatorState *as; struct AggregatorState *as;
as = GNUNET_new (struct AggregatorState); as = GNUNET_new (struct AggregatorState);
as->config_filename = config_filename; as->config_filename = config_filename;
cmd.cls = as;
cmd.label = label; struct TALER_TESTING_Command cmd = {
cmd.run = &aggregator_run; .cls = as,
cmd.cleanup = &aggregator_cleanup; .label = label,
cmd.traits = &aggregator_traits; .run = &aggregator_run,
.cleanup = &aggregator_cleanup,
.traits = &aggregator_traits
};
return cmd; return cmd;
} }

View File

@ -212,16 +212,20 @@ struct TALER_TESTING_Command
TALER_TESTING_cmd_exec_auditor_sign (const char *label, TALER_TESTING_cmd_exec_auditor_sign (const char *label,
const char *config_filename) const char *config_filename)
{ {
struct TALER_TESTING_Command cmd;
struct AuditorSignState *ass; struct AuditorSignState *ass;
ass = GNUNET_new (struct AuditorSignState); ass = GNUNET_new (struct AuditorSignState);
ass->config_filename = config_filename; ass->config_filename = config_filename;
cmd.cls = ass;
cmd.label = label;
cmd.run = &auditor_sign_run; struct TALER_TESTING_Command cmd = {
cmd.cleanup = &auditor_sign_cleanup; .cls = ass,
cmd.traits = &auditor_sign_traits; .label = label,
.run = &auditor_sign_run,
.cleanup = &auditor_sign_cleanup,
.traits = &auditor_sign_traits
};
return cmd; return cmd;
} }

View File

@ -150,16 +150,19 @@ struct TALER_TESTING_Command
TALER_TESTING_cmd_exec_keyup (const char *label, TALER_TESTING_cmd_exec_keyup (const char *label,
const char *config_filename) const char *config_filename)
{ {
struct TALER_TESTING_Command cmd;
struct KeyupState *ks; struct KeyupState *ks;
ks = GNUNET_new (struct KeyupState); ks = GNUNET_new (struct KeyupState);
ks->config_filename = config_filename; ks->config_filename = config_filename;
cmd.cls = ks;
cmd.label = label; struct TALER_TESTING_Command cmd = {
cmd.run = &keyup_run; .cls = ks,
cmd.cleanup = &keyup_cleanup; .label = label,
cmd.traits = &keyup_traits; .run = &keyup_run,
.cleanup = &keyup_cleanup,
.traits = &keyup_traits
};
return cmd; return cmd;
} }

View File

@ -148,16 +148,20 @@ struct TALER_TESTING_Command
TALER_TESTING_cmd_exec_wirewatch (const char *label, TALER_TESTING_cmd_exec_wirewatch (const char *label,
const char *config_filename) const char *config_filename)
{ {
struct TALER_TESTING_Command cmd;
struct WirewatchState *ws; struct WirewatchState *ws;
ws = GNUNET_new (struct WirewatchState); ws = GNUNET_new (struct WirewatchState);
ws->config_filename = config_filename; ws->config_filename = config_filename;
cmd.cls = ws;
cmd.label = label;
cmd.run = &wirewatch_run; struct TALER_TESTING_Command cmd = {
cmd.cleanup = &wirewatch_cleanup; .cls = ws,
cmd.traits = &wirewatch_traits; .label = label,
.run = &wirewatch_run,
.cleanup = &wirewatch_cleanup,
.traits = &wirewatch_traits
};
return cmd; return cmd;
} }

View File

@ -486,7 +486,6 @@ TALER_TESTING_cmd_fakebank_transfer
const char *auth_password, const char *auth_password,
const char *exchange_url) const char *exchange_url)
{ {
struct TALER_TESTING_Command cmd;
struct FakebankTransferState *fts; struct FakebankTransferState *fts;
fts = GNUNET_new (struct FakebankTransferState); fts = GNUNET_new (struct FakebankTransferState);
@ -506,11 +505,15 @@ TALER_TESTING_cmd_fakebank_transfer
label); label);
GNUNET_assert (0); GNUNET_assert (0);
} }
cmd.cls = fts;
cmd.label = label; struct TALER_TESTING_Command cmd = {
cmd.run = &fakebank_transfer_run; .cls = fts,
cmd.cleanup = &fakebank_transfer_cleanup; .label = label,
cmd.traits = &fakebank_transfer_traits; .run = &fakebank_transfer_run,
.cleanup = &fakebank_transfer_cleanup,
.traits = &fakebank_transfer_traits
};
return cmd; return cmd;
} }
@ -549,7 +552,6 @@ TALER_TESTING_cmd_fakebank_transfer_with_subject
const char *subject, const char *subject,
const char *exchange_url) const char *exchange_url)
{ {
struct TALER_TESTING_Command cmd;
struct FakebankTransferState *fts; struct FakebankTransferState *fts;
fts = GNUNET_new (struct FakebankTransferState); fts = GNUNET_new (struct FakebankTransferState);
@ -575,11 +577,15 @@ TALER_TESTING_cmd_fakebank_transfer_with_subject
label); label);
GNUNET_assert (0); GNUNET_assert (0);
} }
cmd.cls = fts;
cmd.label = label; struct TALER_TESTING_Command cmd = {
cmd.run = &fakebank_transfer_run; .cls = fts,
cmd.cleanup = &fakebank_transfer_cleanup; .label = label,
cmd.traits = &fakebank_transfer_traits; .run = &fakebank_transfer_run,
.cleanup = &fakebank_transfer_cleanup,
.traits = &fakebank_transfer_traits
};
return cmd; return cmd;
} }
@ -619,7 +625,6 @@ TALER_TESTING_cmd_fakebank_transfer_with_ref
const char *ref, const char *ref,
const char *exchange_url) const char *exchange_url)
{ {
struct TALER_TESTING_Command cmd;
struct FakebankTransferState *fts; struct FakebankTransferState *fts;
fts = GNUNET_new (struct FakebankTransferState); fts = GNUNET_new (struct FakebankTransferState);
@ -640,11 +645,15 @@ TALER_TESTING_cmd_fakebank_transfer_with_ref
label); label);
GNUNET_assert (0); GNUNET_assert (0);
} }
cmd.cls = fts;
cmd.label = label; struct TALER_TESTING_Command cmd = {
cmd.run = &fakebank_transfer_run; .cls = fts,
cmd.cleanup = &fakebank_transfer_cleanup; .label = label,
cmd.traits = &fakebank_transfer_traits; .run = &fakebank_transfer_run,
.cleanup = &fakebank_transfer_cleanup,
.traits = &fakebank_transfer_traits
};
return cmd; return cmd;
} }
@ -691,7 +700,6 @@ TALER_TESTING_cmd_fakebank_transfer_with_instance
const char *exchange_url, const char *exchange_url,
const char *config_filename) const char *config_filename)
{ {
struct TALER_TESTING_Command cmd;
struct FakebankTransferState *fts; struct FakebankTransferState *fts;
fts = GNUNET_new (struct FakebankTransferState); fts = GNUNET_new (struct FakebankTransferState);
@ -713,11 +721,15 @@ TALER_TESTING_cmd_fakebank_transfer_with_instance
label); label);
GNUNET_assert (0); GNUNET_assert (0);
} }
cmd.cls = fts;
cmd.label = label; struct TALER_TESTING_Command cmd = {
cmd.run = &fakebank_transfer_run; .cls = fts,
cmd.cleanup = &fakebank_transfer_cleanup; .label = label,
cmd.traits = &fakebank_transfer_traits; .run = &fakebank_transfer_run,
.cleanup = &fakebank_transfer_cleanup,
.traits = &fakebank_transfer_traits
};
return cmd; return cmd;
} }

View File

@ -444,17 +444,18 @@ TALER_TESTING_cmd_payback (const char *label,
const char *amount) const char *amount)
{ {
struct PaybackState *ps; struct PaybackState *ps;
struct TALER_TESTING_Command cmd;
ps = GNUNET_new (struct PaybackState); ps = GNUNET_new (struct PaybackState);
ps->expected_response_code = expected_response_code; ps->expected_response_code = expected_response_code;
ps->coin_reference = coin_reference; ps->coin_reference = coin_reference;
ps->amount = amount; ps->amount = amount;
cmd.cls = ps; struct TALER_TESTING_Command cmd = {
cmd.label = label; .cls = ps,
cmd.run = &payback_run; .label = label,
cmd.cleanup = &payback_cleanup; .run = &payback_run,
.cleanup = &payback_cleanup
};
return cmd; return cmd;
} }
@ -479,18 +480,19 @@ TALER_TESTING_cmd_revoke (const char *label,
{ {
struct RevokeState *rs; struct RevokeState *rs;
struct TALER_TESTING_Command cmd;
rs = GNUNET_new (struct RevokeState); rs = GNUNET_new (struct RevokeState);
rs->expected_response_code = expected_response_code; rs->expected_response_code = expected_response_code;
rs->coin_reference = coin_reference; rs->coin_reference = coin_reference;
rs->config_filename = config_filename; rs->config_filename = config_filename;
cmd.cls = rs; struct TALER_TESTING_Command cmd = {
cmd.label = label; .cls = rs,
cmd.run = &revoke_run; .label = label,
cmd.cleanup = &revoke_cleanup; .run = &revoke_run,
cmd.traits = &revoke_traits; .cleanup = &revoke_cleanup,
.traits = &revoke_traits
};
return cmd; return cmd;
} }

View File

@ -1077,7 +1077,6 @@ TALER_TESTING_cmd_refresh_melt
{ {
struct RefreshMeltState *rms; struct RefreshMeltState *rms;
struct MeltDetails md; struct MeltDetails md;
struct TALER_TESTING_Command cmd;
md.coin_reference = coin_reference; md.coin_reference = coin_reference;
md.amount = amount; md.amount = amount;
@ -1086,11 +1085,14 @@ TALER_TESTING_cmd_refresh_melt
rms->melted_coin = md; rms->melted_coin = md;
rms->expected_response_code = expected_response_code; rms->expected_response_code = expected_response_code;
cmd.label = label; struct TALER_TESTING_Command cmd = {
cmd.cls = rms; .label = label,
cmd.run = &refresh_melt_run; .cls = rms,
cmd.cleanup = &refresh_melt_cleanup; .run = &refresh_melt_run,
cmd.traits = &refresh_melt_traits; .cleanup = &refresh_melt_cleanup,
.traits = &refresh_melt_traits
};
return cmd; return cmd;
} }
@ -1118,7 +1120,6 @@ TALER_TESTING_cmd_refresh_melt_double
{ {
struct RefreshMeltState *rms; struct RefreshMeltState *rms;
struct MeltDetails md; struct MeltDetails md;
struct TALER_TESTING_Command cmd;
md.coin_reference = coin_reference; md.coin_reference = coin_reference;
md.amount = amount; md.amount = amount;
@ -1128,11 +1129,14 @@ TALER_TESTING_cmd_refresh_melt_double
rms->expected_response_code = expected_response_code; rms->expected_response_code = expected_response_code;
rms->double_melt = GNUNET_YES; rms->double_melt = GNUNET_YES;
cmd.label = label; struct TALER_TESTING_Command cmd = {
cmd.cls = rms; .label = label,
cmd.run = &refresh_melt_run; .cls = rms,
cmd.cleanup = &refresh_melt_cleanup; .run = &refresh_melt_run,
cmd.traits = &refresh_melt_traits; .cleanup = &refresh_melt_cleanup,
.traits = &refresh_melt_traits
};
return cmd; return cmd;
} }
@ -1228,17 +1232,19 @@ TALER_TESTING_cmd_refresh_reveal
unsigned int expected_response_code) unsigned int expected_response_code)
{ {
struct RefreshRevealState *rrs; struct RefreshRevealState *rrs;
struct TALER_TESTING_Command cmd;
rrs = GNUNET_new (struct RefreshRevealState); rrs = GNUNET_new (struct RefreshRevealState);
rrs->melt_reference = melt_reference; rrs->melt_reference = melt_reference;
rrs->expected_response_code = expected_response_code; rrs->expected_response_code = expected_response_code;
cmd.cls = rrs; struct TALER_TESTING_Command cmd = {
cmd.label = label; .cls = rrs,
cmd.run = &refresh_reveal_run; .label = label,
cmd.cleanup = &refresh_reveal_cleanup; .run = &refresh_reveal_run,
cmd.traits = &refresh_reveal_traits; .cleanup = &refresh_reveal_cleanup,
.traits = &refresh_reveal_traits
};
return cmd; return cmd;
} }
@ -1277,16 +1283,18 @@ TALER_TESTING_cmd_refresh_link
unsigned int expected_response_code) unsigned int expected_response_code)
{ {
struct RefreshLinkState *rrs; struct RefreshLinkState *rrs;
struct TALER_TESTING_Command cmd;
rrs = GNUNET_new (struct RefreshLinkState); rrs = GNUNET_new (struct RefreshLinkState);
rrs->reveal_reference = reveal_reference; rrs->reveal_reference = reveal_reference;
rrs->expected_response_code = expected_response_code; rrs->expected_response_code = expected_response_code;
cmd.cls = rrs; struct TALER_TESTING_Command cmd = {
cmd.label = label; .cls = rrs,
cmd.run = &refresh_link_run; .label = label,
cmd.cleanup = &refresh_link_cleanup; .run = &refresh_link_run,
.cleanup = &refresh_link_cleanup
};
return cmd; return cmd;
} }

View File

@ -268,7 +268,6 @@ TALER_TESTING_cmd_refund (const char *label,
const char *coin_reference) const char *coin_reference)
{ {
struct RefundState *rs; struct RefundState *rs;
struct TALER_TESTING_Command cmd;
rs = GNUNET_new (struct RefundState); rs = GNUNET_new (struct RefundState);
@ -277,10 +276,12 @@ TALER_TESTING_cmd_refund (const char *label,
rs->refund_fee = refund_fee; rs->refund_fee = refund_fee;
rs->coin_reference = coin_reference; rs->coin_reference = coin_reference;
cmd.cls = rs; struct TALER_TESTING_Command cmd = {
cmd.label = label; .cls = rs,
cmd.run = &refund_run; .label = label,
cmd.cleanup = &refund_cleanup; .run = &refund_run,
.cleanup = &refund_cleanup
};
return cmd; return cmd;
} }
@ -310,7 +311,6 @@ TALER_TESTING_cmd_refund_with_id
uint64_t refund_transaction_id) uint64_t refund_transaction_id)
{ {
struct RefundState *rs; struct RefundState *rs;
struct TALER_TESTING_Command cmd;
rs = GNUNET_new (struct RefundState); rs = GNUNET_new (struct RefundState);
@ -320,10 +320,12 @@ TALER_TESTING_cmd_refund_with_id
rs->coin_reference = coin_reference; rs->coin_reference = coin_reference;
rs->refund_transaction_id = refund_transaction_id; rs->refund_transaction_id = refund_transaction_id;
cmd.cls = rs; struct TALER_TESTING_Command cmd = {
cmd.label = label; .cls = rs,
cmd.run = &refund_run; .label = label,
cmd.cleanup = &refund_cleanup; .run = &refund_run,
.cleanup = &refund_cleanup
};
return cmd; return cmd;
} }

View File

@ -99,15 +99,18 @@ TALER_TESTING_cmd_signal (const char *label,
int signal) int signal)
{ {
struct SignalState *ss; struct SignalState *ss;
struct TALER_TESTING_Command cmd;
ss = GNUNET_new (struct SignalState); ss = GNUNET_new (struct SignalState);
ss->process = process; ss->process = process;
ss->signal = signal; ss->signal = signal;
cmd.cls = ss;
cmd.label = label;
cmd.run = &signal_run; struct TALER_TESTING_Command cmd = {
cmd.cleanup = &signal_cleanup; .cls = ss,
.label = label,
.run = &signal_run,
.cleanup = &signal_cleanup
};
return cmd; return cmd;
} }

View File

@ -88,14 +88,17 @@ TALER_TESTING_cmd_sleep (const char *label,
unsigned int duration_s) unsigned int duration_s)
{ {
struct SleepState *ss; struct SleepState *ss;
struct TALER_TESTING_Command cmd;
ss = GNUNET_new (struct SleepState); ss = GNUNET_new (struct SleepState);
ss->duration = duration_s; ss->duration = duration_s;
cmd.cls = ss;
cmd.label = label;
cmd.run = &sleep_run; struct TALER_TESTING_Command cmd = {
cmd.cleanup = &sleep_cleanup; .cls = ss,
.label = label,
.run = &sleep_run,
.cleanup = &sleep_cleanup
};
return cmd; return cmd;
} }

View File

@ -246,7 +246,6 @@ TALER_TESTING_cmd_status (const char *label,
const char *expected_balance, const char *expected_balance,
unsigned int expected_response_code) unsigned int expected_response_code)
{ {
struct TALER_TESTING_Command cmd;
struct StatusState *ss; struct StatusState *ss;
ss = GNUNET_new (struct StatusState); ss = GNUNET_new (struct StatusState);
@ -254,10 +253,12 @@ TALER_TESTING_cmd_status (const char *label,
ss->expected_balance = expected_balance; ss->expected_balance = expected_balance;
ss->expected_response_code = expected_response_code; ss->expected_response_code = expected_response_code;
cmd.cls = ss; struct TALER_TESTING_Command cmd = {
cmd.label = label; .cls = ss,
cmd.run = &status_run; .label = label,
cmd.cleanup = &status_cleanup; .run = &status_run,
.cleanup = &status_cleanup
};
return cmd; return cmd;
} }

View File

@ -418,7 +418,6 @@ TALER_TESTING_cmd_track_transaction
unsigned int expected_response_code, unsigned int expected_response_code,
const char *bank_transfer_reference) const char *bank_transfer_reference)
{ {
struct TALER_TESTING_Command cmd;
struct TrackTransactionState *tts; struct TrackTransactionState *tts;
tts = GNUNET_new (struct TrackTransactionState); tts = GNUNET_new (struct TrackTransactionState);
@ -427,11 +426,13 @@ TALER_TESTING_cmd_track_transaction
tts->bank_transfer_reference = bank_transfer_reference; tts->bank_transfer_reference = bank_transfer_reference;
tts->coin_index = coin_index; tts->coin_index = coin_index;
cmd.cls = tts; struct TALER_TESTING_Command cmd = {
cmd.label = label; .cls = tts,
cmd.run = &track_transaction_run; .label = label,
cmd.cleanup = &track_transaction_cleanup; .run = &track_transaction_run,
cmd.traits = &track_transaction_traits; .cleanup = &track_transaction_cleanup,
.traits = &track_transaction_traits
};
return cmd; return cmd;
} }
@ -744,7 +745,6 @@ TALER_TESTING_cmd_track_transfer_empty
unsigned int expected_response_code) unsigned int expected_response_code)
{ {
struct TrackTransferState *tts; struct TrackTransferState *tts;
struct TALER_TESTING_Command cmd;
tts = GNUNET_new (struct TrackTransferState); tts = GNUNET_new (struct TrackTransferState);
@ -752,10 +752,12 @@ TALER_TESTING_cmd_track_transfer_empty
tts->index = index; tts->index = index;
tts->expected_response_code = expected_response_code; tts->expected_response_code = expected_response_code;
cmd.cls = tts; struct TALER_TESTING_Command cmd = {
cmd.label = label; .cls = tts,
cmd.run = &track_transfer_run; .label = label,
cmd.cleanup = &track_transfer_cleanup; .run = &track_transfer_run,
.cleanup = &track_transfer_cleanup
};
return cmd; return cmd;
} }
@ -786,7 +788,6 @@ TALER_TESTING_cmd_track_transfer
const char *expected_wire_fee) const char *expected_wire_fee)
{ {
struct TrackTransferState *tts; struct TrackTransferState *tts;
struct TALER_TESTING_Command cmd;
tts = GNUNET_new (struct TrackTransferState); tts = GNUNET_new (struct TrackTransferState);
@ -796,10 +797,12 @@ TALER_TESTING_cmd_track_transfer
tts->expected_total_amount = expected_total_amount; tts->expected_total_amount = expected_total_amount;
tts->expected_wire_fee = expected_wire_fee; tts->expected_wire_fee = expected_wire_fee;
cmd.cls = tts; struct TALER_TESTING_Command cmd = {
cmd.label = label; .cls = tts,
cmd.run = &track_transfer_run; .label = label,
cmd.cleanup = &track_transfer_cleanup; .run = &track_transfer_run,
.cleanup = &track_transfer_cleanup
};
return cmd; return cmd;
} }

View File

@ -216,7 +216,6 @@ TALER_TESTING_cmd_wire (const char *label,
const char *expected_fee, const char *expected_fee,
unsigned int expected_response_code) unsigned int expected_response_code)
{ {
struct TALER_TESTING_Command cmd;
struct WireState *ws; struct WireState *ws;
ws = GNUNET_new (struct WireState); ws = GNUNET_new (struct WireState);
@ -224,10 +223,12 @@ TALER_TESTING_cmd_wire (const char *label,
ws->expected_fee = expected_fee; ws->expected_fee = expected_fee;
ws->expected_response_code = expected_response_code; ws->expected_response_code = expected_response_code;
cmd.cls = ws; struct TALER_TESTING_Command cmd = {
cmd.label = label; .cls = ws,
cmd.run = &wire_run; .label = label,
cmd.cleanup = &wire_cleanup; .run = &wire_run,
.cleanup = &wire_cleanup
};
return cmd; return cmd;
} }

View File

@ -412,7 +412,6 @@ TALER_TESTING_cmd_withdraw_amount
const char *amount, const char *amount,
unsigned int expected_response_code) unsigned int expected_response_code)
{ {
struct TALER_TESTING_Command cmd;
struct WithdrawState *ws; struct WithdrawState *ws;
ws = GNUNET_new (struct WithdrawState); ws = GNUNET_new (struct WithdrawState);
@ -431,11 +430,14 @@ TALER_TESTING_cmd_withdraw_amount
ws->expected_response_code = expected_response_code; ws->expected_response_code = expected_response_code;
cmd.cls = ws; struct TALER_TESTING_Command cmd = {
cmd.label = label; .cls = ws,
cmd.run = &withdraw_run; .label = label,
cmd.cleanup = &withdraw_cleanup; .run = &withdraw_run,
cmd.traits = &withdraw_traits; .cleanup = &withdraw_cleanup,
.traits = &withdraw_traits
};
return cmd; return cmd;
} }
@ -460,7 +462,6 @@ TALER_TESTING_cmd_withdraw_denomination
const struct TALER_EXCHANGE_DenomPublicKey *dk, const struct TALER_EXCHANGE_DenomPublicKey *dk,
unsigned int expected_response_code) unsigned int expected_response_code)
{ {
struct TALER_TESTING_Command cmd;
struct WithdrawState *ws; struct WithdrawState *ws;
if (NULL == dk) if (NULL == dk)
@ -475,11 +476,14 @@ TALER_TESTING_cmd_withdraw_denomination
ws->pk = dk; ws->pk = dk;
ws->expected_response_code = expected_response_code; ws->expected_response_code = expected_response_code;
cmd.cls = ws; struct TALER_TESTING_Command cmd = {
cmd.label = label; .cls = ws,
cmd.run = &withdraw_run; .label = label,
cmd.cleanup = &withdraw_cleanup; .run = &withdraw_run,
cmd.traits = &withdraw_traits; .cleanup = &withdraw_cleanup,
.traits = &withdraw_traits
};
return cmd; return cmd;
} }