Skip to content

Commit

Permalink
fix: remove tests and update counts
Browse files Browse the repository at this point in the history
  • Loading branch information
notanatol committed Feb 2, 2024
1 parent 2a8816f commit f41ed05
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 89 deletions.
81 changes: 0 additions & 81 deletions pkg/node/statestore_test.go

This file was deleted.

12 changes: 5 additions & 7 deletions pkg/postage/batchstore/store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ func TestBatchStore_Reset(t *testing.T) {

// we expect one key in the statestore since the schema name
// will always be there.
if c != 1 {
if c != 0 {
t.Fatalf("expected only one key in statestore, got %d", c)
}
}
Expand All @@ -242,11 +242,6 @@ func TestBatchSave(t *testing.T) {
defaultDepth := uint8(8)
defaultValue := 1

type testCase struct {
add []testBatch
name string
}

// Test cases define each batches's depth, value, and the new radius
// of the reserve state after the batch is saved.
// In some cases, batches with zero values are added to check that the radius is not altered.
Expand All @@ -258,7 +253,10 @@ func TestBatchSave(t *testing.T) {
// With two batches of the same depth, the calculation is as such: log2((256 + 256) / 32) = 5.
// The ceiling function is used to round up results so the actual formula is ceil(log2(totalCommitment/node_capacity)) = R

tcs := []testCase{
tcs := []struct {
add []testBatch
name string
}{
{
name: "first batch's depth is below capacity",
add: []testBatch{
Expand Down
2 changes: 1 addition & 1 deletion pkg/statestore/test/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,5 +225,5 @@ func testStoreIterator(t *testing.T, store storage.StateStorer, prefix string, s
func testEmpty(t *testing.T, store storage.StateStorer) {
t.Helper()

testStoreIterator(t, store, "", 1) // 1 because of the schema entry.
testStoreIterator(t, store, "", 0) // 1 because of the schema entry.
}

0 comments on commit f41ed05

Please sign in to comment.