Skip to content

Commit

Permalink
fix: governance e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
thevaibhav-dixit committed Jan 7, 2025
1 parent 6234e15 commit aba0720
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions bats/governance.bats
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ teardown_file() {
trigger_withdraw_approval_process() {
variables=$(
jq -n \
--arg customerId "$1" \
--arg deposit_account_id "$1" \
'{
input: {
customerId: $customerId,
depositAccountId: $deposit_account_id,
amount: 1000000,
}
}'
Expand All @@ -25,11 +25,11 @@ trigger_withdraw_approval_process() {

variables=$(
jq -n \
--arg customerId "$1" \
--arg deposit_account_id "$1" \
--arg date "$(date +%s%N)" \
'{
input: {
customerId: $customerId,
depositAccountId: $deposit_account_id,
amount: 150000,
reference: ("withdrawal-ref-" + $date)
}
Expand All @@ -45,7 +45,16 @@ trigger_withdraw_approval_process() {
customer_id=$(create_customer)
cache_value "customer_id" $customer_id

process_id=$(trigger_withdraw_approval_process $customer_id)
variables=$(
jq -n \
--arg id "$customer_id" \
'{ id: $id }'
)
exec_admin_graphql 'customer' "$variables"
deposit_account_id=$(graphql_output .data.customer.depositAccount.depositAccountId)
cache_value "deposit_account_id" $deposit_account_id

process_id=$(trigger_withdraw_approval_process $deposit_account_id)
variables=$(
jq -n \
--arg id "$process_id" \
Expand Down

0 comments on commit aba0720

Please sign in to comment.