Commit 6c7da70a authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[enh] #1338 Add b_index check during integration tests

parent ecb0ea56
#!/usr/bin/env bash
G1_TARGET_BLOCK=132446 # This is a fixed block# which determines to the sha1 hashes
G1_BINDEX_CS=a8c653572688bcb9887dfe080c1aaab17f6d8b7e
G1_IINDEX_CS=26393b64cdb9abb8e4012d6914f475635cba4c60
G1_MINDEX_CS=7c5f07c7705647365b8965fcfc5a084c2f82a388
G1_CINDEX_CS=3803c1ed8d3dd8f31558666d8dfd30272a6d0b74
G1_SINDEX_CS=551bdba1855d5c49cd503fcb8ad787b2a24c2c42
.gitlab/test/check_indexes.sh /tmp/duniter_ci_dump/ g1 ${G1_TARGET_BLOCK} ${G1_IINDEX_CS} ${G1_MINDEX_CS} ${G1_CINDEX_CS} ${G1_SINDEX_CS}
.gitlab/test/check_indexes.sh /tmp/duniter_ci_dump/ g1 ${G1_TARGET_BLOCK} ${G1_BINDEX_CS} ${G1_IINDEX_CS} ${G1_MINDEX_CS} ${G1_CINDEX_CS} ${G1_SINDEX_CS}
#!/usr/bin/env bash
GT_TARGET_BLOCK=210000 # This is a fixed block# which determines to the sha1 hashes
GT_BINDEX_CS=2180041597ef05aa8defc757a16fe955355960ba
GT_IINDEX_CS=dfd2dfc3d4d0ced4c101badb4d4a1ab85de8cbde
GT_MINDEX_CS=d867b887663cdfad8ac42dacc6081d638eea0976
GT_CINDEX_CS=b141361fb40f4c13f03f4640151c7674e190a4dd
GT_SINDEX_CS=7c6801027e39b9fea9be973d8773ac77d2c9a1f9
.gitlab/test/check_indexes.sh /tmp/duniter_ci_dump/ gt ${GT_TARGET_BLOCK} ${GT_IINDEX_CS} ${GT_MINDEX_CS} ${GT_CINDEX_CS} ${GT_SINDEX_CS}
.gitlab/test/check_indexes.sh /tmp/duniter_ci_dump/ gt ${GT_TARGET_BLOCK} ${GT_BINDEX_CS} ${GT_IINDEX_CS} ${GT_MINDEX_CS} ${GT_CINDEX_CS} ${GT_SINDEX_CS}
......@@ -7,10 +7,11 @@ CURRENCY=$2
ARCHIVES="$DUMP_DIR/archives_$CURRENCY"
DB_TEST="gitlab_ci_sync_test_$CURRENCY"
G1_TARGET_BLOCK=$3 # This is a fixed block# which determines to the sha1 hashes
G1_IINDEX_CS=$4
G1_MINDEX_CS=$5
G1_CINDEX_CS=$6
G1_SINDEX_CS=$7
G1_BINDEX_CS=$4
G1_IINDEX_CS=$5
G1_MINDEX_CS=$6
G1_CINDEX_CS=$7
G1_SINDEX_CS=$8
checksum_test() {
local table=$1
......@@ -55,6 +56,7 @@ echo "Positionnement dans $ORIGIN_DIR"
cd ${ORIGIN_DIR}
sync_data ${DB_TEST} "$ARCHIVES/$CURRENCY" ${G1_TARGET_BLOCK}
checksum_test b_index ${G1_BINDEX_CS} ${DB_TEST}
checksum_test i_index ${G1_IINDEX_CS} ${DB_TEST}
checksum_test m_index ${G1_MINDEX_CS} ${DB_TEST}
checksum_test c_index ${G1_CINDEX_CS} ${DB_TEST}
......
......@@ -102,6 +102,11 @@ async function dumpTable(server: Server, name: string, condition?: string) {
}
let rows: any[]
switch (name) {
case 'b_index':
rows = await server.dal.bindexDAL.findRawWithOrder(criterion, [['number', false]])
dump(rows, ['version','bsize','hash','issuer','time','number','membersCount','issuersCount','issuersFrame','issuersFrameVar','issuerDiff','avgBlockSize','medianTime','dividend','mass','unitBase','powMin','udTime','udReevalTime','diffNumber','speed','massReeval'])
break
case 'i_index':
rows = await server.dal.iindexDAL.findRawWithOrder(criterion, [['writtenOn', false], ['wotb_id', false]])
dump(rows, ['op','uid','pub','hash','sig','created_on','written_on','member','wasMember','kick','wotb_id'])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment