merkle: Mark test helpers as test helpers
@@ -12,17 +12,20 @@ import (
// helper method - validate we can get value from tree and that result matches expected value v
func validateGet(t *testing.T, tree MerkleTree, k, v []byte) {
+ t.Helper()
res, _, err := tree.Get(k)
assert.NoErr(t, err, "failed to get data")
assert.True(t, bytes.Equal(res, v), "unexpected data")
}
func tryPut(t *testing.T, tree MerkleTree, k, v []byte) {
+ t.Helper()
err := tree.Put(k, v)
assert.NoErr(t, err, "failed to put data.")
}
func getDbPaths(t *testing.T) (string, string) {
+ t.Helper()
tempDir, err := filesystem.GetSpaceMeshTempDirectoryPath()
assert.NoErr(t, err, "failed to get temp dir")
userDb := filepath.Join(tempDir, "userdata.db")
