mirror of
https://github.com/valitydev/holmes.git
synced 2024-11-06 01:45:25 +00:00
HG-63: Fill proper account ids in the base fixture (#6)
This commit is contained in:
parent
860ff226a5
commit
c3840a0e68
@ -4,7 +4,16 @@
|
||||
"data": {
|
||||
"party_prototype": {"id": 42},
|
||||
"providers": {"value": [{"id": 1}]},
|
||||
"system_accounts": {"predicates": []}
|
||||
"system_accounts": {"value": [{"id": 1}]}
|
||||
}
|
||||
}}}},
|
||||
{"insert": {"object": {"system_account_set": {
|
||||
"ref": {"id": 1},
|
||||
"data": {
|
||||
"name": "Primary",
|
||||
"description": "Primary",
|
||||
"currency": {"symbolic_code": "RUB"},
|
||||
"compensation": $(${CURDIR}/create-account.sh RUB $*)
|
||||
}
|
||||
}}}},
|
||||
{"insert": {"object": {"party_prototype": {
|
||||
@ -127,7 +136,11 @@
|
||||
"volume": {"share": {"parts": {"p": 18, "q": 1000}, "of": "payment_amount"}}
|
||||
}
|
||||
],
|
||||
"accounts": {"currency": {"symbolic_code": "RUB"}, "receipt": 10, "compensation": 11},
|
||||
"accounts": {
|
||||
"currency": {"symbolic_code": "RUB"},
|
||||
"receipt": $(${CURDIR}/create-account.sh RUB $*),
|
||||
"compensation": $(${CURDIR}/create-account.sh RUB $*)
|
||||
},
|
||||
"options": {"override": "Brominal 1"}
|
||||
}
|
||||
}}}},
|
@ -1,6 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
export CURDIR="$(dirname ${0})"
|
||||
export LIBDIR="${CURDIR}/../lib"
|
||||
|
||||
FIXTURE="$(${LIBDIR}/template.sh ${CURDIR}/base-fixture.commit.json.tpl $*)"
|
||||
|
||||
woorl $* \
|
||||
-s damsel/proto/domain_config.thrift \
|
||||
http://dominant:8022/v1/domain/repository \
|
||||
Repository Commit 0 "$(cat $(dirname $0)/base-fixture.commit.json)"
|
||||
Repository Commit 0 "${FIXTURE}"
|
||||
|
11
scripts/dominant/create-account.sh
Executable file
11
scripts/dominant/create-account.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
CURRENCY=${1}
|
||||
shift 1
|
||||
|
||||
[ -z "${CURRENCY}" ] && { echo "No currency code specified"; exit -1; }
|
||||
|
||||
woorl $* \
|
||||
-s damsel/proto/accounter.thrift \
|
||||
http://shumway:8022/accounter \
|
||||
Accounter CreateAccount "{\"currency_sym_code\":\"${CURRENCY}\"}"
|
5
scripts/lib/template.sh
Executable file
5
scripts/lib/template.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
eval "shift 1 && cat <<EOF
|
||||
$(<$1)
|
||||
EOF"
|
Loading…
Reference in New Issue
Block a user