mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 03:16:45 +01:00
Merge pull request #442 from hermeznetwork/feature/new-metrics-tests
Added new metrics tests
This commit is contained in:
@@ -64,7 +64,6 @@ func TestUpdateNetworkInfo(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestUpdateMetrics(t *testing.T) {
|
||||
// TODO: Improve checks when til is integrated
|
||||
// Update Metrics needs api.status.Network.LastBatch.BatchNum to be updated
|
||||
lastBlock := tc.blocks[3]
|
||||
lastBatchNum := common.BatchNum(3)
|
||||
@@ -76,7 +75,7 @@ func TestUpdateMetrics(t *testing.T) {
|
||||
assert.NoError(t, err)
|
||||
assert.Greater(t, api.status.Metrics.TransactionsPerBatch, float64(0))
|
||||
assert.Greater(t, api.status.Metrics.BatchFrequency, float64(0))
|
||||
assert.Greater(t, api.status.Metrics.TransactionsPerBatch, float64(0))
|
||||
assert.Greater(t, api.status.Metrics.TransactionsPerSecond, float64(0))
|
||||
assert.Greater(t, api.status.Metrics.TotalAccounts, int64(0))
|
||||
assert.Greater(t, api.status.Metrics.TotalBJJs, int64(0))
|
||||
assert.Greater(t, api.status.Metrics.AvgTransactionFee, float64(0))
|
||||
@@ -126,7 +125,7 @@ func TestGetState(t *testing.T) {
|
||||
// TODO: perform real asserts (not just greater than 0)
|
||||
assert.Greater(t, status.Metrics.TransactionsPerBatch, float64(0))
|
||||
assert.Greater(t, status.Metrics.BatchFrequency, float64(0))
|
||||
assert.Greater(t, status.Metrics.TransactionsPerBatch, float64(0))
|
||||
assert.Greater(t, status.Metrics.TransactionsPerSecond, float64(0))
|
||||
assert.Greater(t, status.Metrics.TotalAccounts, int64(0))
|
||||
assert.Greater(t, status.Metrics.TotalBJJs, int64(0))
|
||||
assert.Greater(t, status.Metrics.AvgTransactionFee, float64(0))
|
||||
|
||||
Reference in New Issue
Block a user