Skip to content

Commit

Permalink
chore(test): assert eligible rewards are set for current epoch
Browse files Browse the repository at this point in the history
  • Loading branch information
dtfiedler committed Aug 27, 2024
1 parent be4d5c7 commit af4d3f8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 0 additions & 1 deletion .github/workflows/monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ jobs:

- name: Monitor
run: yarn monitor | tee results.txt
continue-on-error: true
id: monitor
env:
IO_PROCESS_ID: ${{ matrix.network == 'testnet' && 'agYcCFJtrMG6cqMuZfskIkFTGvUPddICmtQSBIoPdiA' || 'GaQrvEMKBpkjofgnBi_B3IgIDmY_XYelVLB6GcRGrHc' }}
Expand Down
6 changes: 6 additions & 0 deletions tests/monitor/monitor.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ describe('distribution totals', () => {
const { distributions: currentEpochDistributions } =
await io.getCurrentEpoch();

// assert it has eligible rewards
assert(
currentEpochDistributions.rewards?.eligible !== undefined,
'No eligible rewards found for current epoch',
);

// TODO: for now pass if distributions are empty
if (Object.keys(currentEpochDistributions.rewards.eligible).length === 0) {
return;
Expand Down

0 comments on commit af4d3f8

Please sign in to comment.