Skip to content

Commit

Permalink
chore(api-cardano-db-hasura): Update test assertions based on upstrea…
Browse files Browse the repository at this point in the history
…m fixes

cardano-db-sync now considers EBBs as part of the epoch blocksCount
  • Loading branch information
rhyslbw committed Aug 11, 2020
1 parent 70a8c5e commit dd986d5
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -15,12 +15,12 @@
"mainnet:up": "yarn mainnet:stack && docker-compose -p mainnet logs -f",
"mainnet:dev": "API_PORT=3100 HASURA_PORT=8090 NETWORK=mainnet POSTGRES_PORT=5442 yarn service-dependencies -p mainnet up --build",
"mainnet:down": "docker-compose -p mainnet down",
"mainnet:server": "API_PORT=3100 GENESIS_FILE_BYRON=${PWD}/config/network/mainnet/genesis/byron.json GENESIS_FILE_SHELLEY=${PWD}/config/network/mainnet/genesis/shelley.json HASURA_URI=http://localhost:8090 POSTGRES_PORT=5442 yarn workspace @cardano-graphql/server start",
"mainnet:server": "ALLOW_INTROSPECTION=true API_PORT=3100 GENESIS_FILE_BYRON=${PWD}/config/network/mainnet/genesis/byron.json GENESIS_FILE_SHELLEY=${PWD}/config/network/mainnet/genesis/shelley.json HASURA_URI=http://localhost:8090 POSTGRES_PORT=5442 yarn workspace @cardano-graphql/server start",
"testnet:stack": "API_PORT=3101 HASURA_PORT=8091 NETWORK=testnet POSTGRES_PORT=5443 docker-compose -p testnet up --build -d",
"testnet:up": "yarn testnet:stack && docker-compose -p testnet logs -f",
"testnet:dev": "API_PORT=3101 HASURA_PORT=8091 NETWORK=testnet POSTGRES_PORT=5443 yarn service-dependencies -p testnet up --build",
"testnet:down": "docker-compose -p testnet down",
"testnet:server": "API_PORT=3101 GENESIS_FILE_BYRON=${PWD}/config/network/testnet/genesis/byron.json GENESIS_FILE_SHELLEY=${PWD}/config/network/testnet/genesis/shelley.json HASURA_URI=http://localhost:8091 POSTGRES_PORT=5443 yarn workspace @cardano-graphql/server start",
"testnet:server": "ALLOW_INTROSPECTION=true API_PORT=3101 GENESIS_FILE_BYRON=${PWD}/config/network/testnet/genesis/byron.json GENESIS_FILE_SHELLEY=${PWD}/config/network/testnet/genesis/shelley.json HASURA_URI=http://localhost:8091 POSTGRES_PORT=5443 yarn workspace @cardano-graphql/server start",
"lint": "yarn workspaces run lint",
"loadtest:byron-staging": "artillery run test/loadtest/byron-staging-config.yml",
"publish-packages": "yarn workspaces run publish",
Expand Down
Expand Up @@ -3,7 +3,7 @@ query aggregatedDataWithinEpoch (
) {
epochs( where: { number: { _eq: $number }}) {
blocksCount
blocks_aggregate ( where: { slotNo: { _is_null: false }}) {
blocks_aggregate {
aggregate {
avg {
fees
Expand Down
Expand Up @@ -27,25 +27,25 @@ exports[`epochs Can return aggregated data 1`] = `
Object {
"epochs": Array [
Object {
"blocksCount": "21589",
"blocksCount": "21590",
"blocks_aggregate": Object {
"aggregate": Object {
"avg": Object {
"fees": 47848.56538051786,
"size": 838.0591968131919,
"fees": 47846.34914312181,
"size": 868.0383047707272,
},
"count": "21589",
"count": "21590",
"max": Object {
"fees": "1377042",
"size": "4787",
"size": "648087",
},
"min": Object {
"fees": "0",
"size": "631",
},
"sum": Object {
"fees": "1033002678",
"size": "18092860",
"size": "18740947",
},
},
},
Expand Down Expand Up @@ -74,11 +74,11 @@ exports[`epochs Returns epoch details by number 1`] = `
Object {
"epochs": Array [
Object {
"blocksCount": "21589",
"lastBlockTime": "2017-10-03T21:43:51Z",
"blocksCount": "21590",
"lastBlockTime": "2017-10-03T21:44:31Z",
"number": 1,
"output": "101402912214214220",
"startedAt": "2017-09-28T21:45:51Z",
"startedAt": "2017-09-28T21:44:51Z",
"transactionsCount": "12870",
},
],
Expand All @@ -89,11 +89,11 @@ exports[`epochs Returns epoch details by number range 1`] = `
Object {
"epochs": Array [
Object {
"blocksCount": "21589",
"lastBlockTime": "2017-10-03T21:43:51Z",
"blocksCount": "21590",
"lastBlockTime": "2017-10-03T21:44:31Z",
"number": 1,
"output": "101402912214214220",
"startedAt": "2017-09-28T21:45:51Z",
"startedAt": "2017-09-28T21:44:51Z",
"transactionsCount": "12870",
},
],
Expand Down
@@ -1,32 +1,32 @@
export const epoch1 = {
basic: {
startedAt: '2017-09-28T21:45:51Z',
blocksCount: '21589',
lastBlockTime: '2017-10-03T21:43:51Z',
startedAt: '2017-09-28T21:44:51Z',
blocksCount: '21590',
lastBlockTime: '2017-10-03T21:44:31Z',
output: '101402912214214220',
number: 1,
transactionsCount: '12870'
},
aggregated: {
blocksCount: '21589',
blocksCount: '21590',
blocks_aggregate: {
aggregate: {
avg: {
fees: 47848.56538051786,
size: 838.0591968131919
fees: 47846.34914312181,
size: 868.0383047707272
},
count: '21589',
count: '21590',
max: {
fees: '1377042',
size: '4787'
size: '648087'
},
min: {
fees: '0',
size: '631'
},
sum: {
fees: '1033002678',
size: '18092860'
size: '18740947'
}
}
},
Expand Down

0 comments on commit dd986d5

Please sign in to comment.