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 365361e
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 96 deletions.
81 changes: 0 additions & 81 deletions pkg/node/statestore_test.go

This file was deleted.

2 changes: 1 addition & 1 deletion 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 Down
7 changes: 0 additions & 7 deletions pkg/statestore/mock/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package mock
import (
"encoding"
"encoding/json"
"fmt"
"strings"
"sync"

Expand All @@ -16,8 +15,6 @@ import (

var _ storage.StateStorer = (*store)(nil)

const mockSchemaNameKey = "schema_name"

type store struct {
store map[string][]byte
mtx sync.RWMutex
Expand All @@ -28,10 +25,6 @@ func NewStateStore() storage.StateStorer {
store: make(map[string][]byte),
}

if err := s.Put(mockSchemaNameKey, "mock_schema"); err != nil {
panic(fmt.Errorf("put schema name: %w", err))
}

return s
}

Expand Down
6 changes: 0 additions & 6 deletions pkg/statestore/storeadapter/storeadapter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ func TestStateStoreAdapter(t *testing.T) {
}
})

// The test requires the state store to have
// a schema, otherwise the delete test fails.
if err := store.Put("test_schema", "name"); err != nil {
t.Fatalf("unexpected error: %v", err)
}

return store
})

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 365361e

Please sign in to comment.