Skip to content

Commit

Permalink
fix broken docker network tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberphysic4l committed Apr 23, 2024
1 parent 810e687 commit 9d2f70b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tools/docker-network/tests/api_management_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ func Test_ManagementAPI_Pruning(t *testing.T) {
info, err := nodeClientV1.Info(getContextWithTimeout(5 * time.Second))
require.NoError(t, err)

currentEpoch := nodeClientV1.CommittedAPI().TimeProvider().EpochFromSlot(info.Status.LatestCommitmentID.Slot())
currentEpoch := nodeClientV1.CommittedAPI().TimeProvider().EpochFromSlot(info.Status.LatestFinalizedSlot)

// await the start slot of the next epoch
d.AwaitFinalization(nodeClientV1.CommittedAPI().TimeProvider().EpochStart(currentEpoch + 1))
Expand Down
5 changes: 4 additions & 1 deletion tools/docker-network/tests/dockerframework.go
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,10 @@ func (d *DockerTestFramework) AllotManaTo(fromWallet *mock.Wallet, to *mock.Acco
toCongestionResp, err = clt.Congestion(ctx, to.Address, 0)
require.NoError(d.Testing, err)
newBIC := toCongestionResp.BlockIssuanceCredits
require.Equal(d.Testing, oldBIC+iotago.BlockIssuanceCredits(manaToAllot), newBIC)

decayedOldBIC, err := clt.LatestAPI().ManaDecayProvider().DecayManaBySlots(iotago.Mana(oldBIC), preAllotmentCommitmentID.Slot(), block.ID().Slot())
expectedBIC := iotago.BlockIssuanceCredits(decayedOldBIC + manaToAllot)
require.Equal(d.Testing, expectedBIC, newBIC)
}

// CreateNativeToken request faucet funds then use it to create native token for the account, and returns the updated Account.
Expand Down

0 comments on commit 9d2f70b

Please sign in to comment.