Skip to content

Commit f11ef2b

Browse files
integration test against bespoke ledger & temporary BigQuery dataset (#1479)
- loading and setup - exporting from PG, importing into BQ - needs ledger operations * tests depend on google-cloud-bigquery 2.53.0 Java lib * split BigQuery so it doesn't get run by an existing runner * use stream API - has better support for JSON columns * text-array convert to JSON special case * detailed report of serialization errors * Any is a great type; fixes JSON as JSON * account for zero mints - nonsensical in practice, but possible in this test * tests pass * skip ACL setting * split minted out to #1713 * split daily run out to #1730 * add separate path check for total supply - suggested by @isegall-da; thanks --------- Signed-off-by: Stephen Compall <stephen.compall@digitalasset.com>
1 parent c3920df commit f11ef2b

File tree

4 files changed

+524
-2
lines changed

4 files changed

+524
-2
lines changed

apps/app/src/test/resources/total-supply-bigquery.sql

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,15 +160,17 @@ CREATE TEMP FUNCTION minted(
160160
migration_id int64
161161
) RETURNS bignumeric AS ((
162162
SELECT
163-
SUM(PARSE_BIGNUMERIC(JSON_VALUE(e.result,
163+
COALESCE(SUM(
164+
PARSE_BIGNUMERIC(JSON_VALUE(e.result,
164165
-- .inputAppRewardAmount
165166
TransferResult_summary(0)))
166167
+ PARSE_BIGNUMERIC(JSON_VALUE(e.result,
167168
-- .inputValidatorRewardAmount
168169
TransferResult_summary(1)))
169170
+ PARSE_BIGNUMERIC(JSON_VALUE(e.result,
170171
-- .inputSvRewardAmount
171-
TransferResult_summary(2))))
172+
TransferResult_summary(2)))),
173+
0)
172174
FROM
173175
mainnet_da2_scan.scan_sv_1_update_history_exercises e
174176
WHERE

0 commit comments

Comments
 (0)