Skip to content

Commit

Permalink
Add t.Helper() to newTestGenesisWithTrieAndHeader
Browse files Browse the repository at this point in the history
  • Loading branch information
qdm12 committed Sep 13, 2022
1 parent 83b99e1 commit f155179
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dot/core/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ func NewTestService(t *testing.T, cfg *Config) *Service {

func newTestGenesisWithTrieAndHeader(t *testing.T) (
gen genesis.Genesis, genesisTrie trie.Trie, genesisHeader types.Header) {
t.Helper()

genesisPath := utils.GetGssmrV3SubstrateGenesisRawPathTest(t)
genPtr, err := genesis.NewGenesisFromJSONRaw(genesisPath)
require.NoError(t, err)
Expand Down
2 changes: 2 additions & 0 deletions dot/digest/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import (

func newTestGenesisWithTrieAndHeader(t *testing.T) (
gen genesis.Genesis, genesisTrie trie.Trie, genesisHeader types.Header) {
t.Helper()

genesisPath := utils.GetGssmrV3SubstrateGenesisRawPathTest(t)
genesisPtr, err := genesis.NewGenesisFromJSONRaw(genesisPath)
require.NoError(t, err)
Expand Down
2 changes: 2 additions & 0 deletions dot/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ func writeGenesisToTestJSON(t *testing.T, genesis genesis.Genesis) (filename str

func newTestGenesisWithTrieAndHeader(t *testing.T) (
gen genesis.Genesis, genesisTrie trie.Trie, genesisHeader types.Header) {
t.Helper()

genesisPath := utils.GetGssmrV3SubstrateGenesisRawPathTest(t)
genPtr, err := genesis.NewGenesisFromJSONRaw(genesisPath)
require.NoError(t, err)
Expand Down
2 changes: 2 additions & 0 deletions dot/rpc/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import (

func newTestGenesisWithTrieAndHeader(t *testing.T) (
gen genesis.Genesis, genesisTrie trie.Trie, genesisHeader types.Header) {
t.Helper()

genesisPath := utils.GetGssmrV3SubstrateGenesisRawPathTest(t)
genesisPtr, err := genesis.NewGenesisFromJSONRaw(genesisPath)
require.NoError(t, err)
Expand Down
2 changes: 2 additions & 0 deletions dot/rpc/modules/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ func makeChange(keyHex, valueHex string) [2]*string {

func newTestGenesisWithTrieAndHeader(t *testing.T) (
gen genesis.Genesis, genesisTrie trie.Trie, genesisHeader types.Header) {
t.Helper()

genesisPath := utils.GetGssmrV3SubstrateGenesisRawPathTest(t)
genesisPtr, err := genesis.NewGenesisFromJSONRaw(genesisPath)
require.NoError(t, err)
Expand Down
2 changes: 2 additions & 0 deletions dot/state/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ func generateRandBytes(tb testing.TB, size int,

func newTestGenesisWithTrieAndHeader(t *testing.T) (
gen genesis.Genesis, genesisTrie trie.Trie, genesisHeader types.Header) {
t.Helper()

genesisPath := utils.GetGssmrV3SubstrateGenesisRawPathTest(t)
genesisPtr, err := genesis.NewGenesisFromJSONRaw(genesisPath)
require.NoError(t, err)
Expand Down
2 changes: 2 additions & 0 deletions dot/sync/syncer_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ func newTestSyncer(t *testing.T) *Service {

func newTestGenesisWithTrieAndHeader(t *testing.T) (
gen genesis.Genesis, genesisTrie trie.Trie, genesisHeader types.Header) {
t.Helper()

genesisPath := utils.GetGssmrV3SubstrateGenesisRawPathTest(t)
genesisPtr, err := genesis.NewGenesisFromJSONRaw(genesisPath)
require.NoError(t, err)
Expand Down
2 changes: 2 additions & 0 deletions lib/babe/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ func newDevGenesisWithTrieAndHeader(t *testing.T) (

func newTestGenesisWithTrieAndHeader(t *testing.T) (
gen genesis.Genesis, genesisTrie trie.Trie, genesisHeader types.Header) {
t.Helper()

genesisPath := utils.GetGssmrV3SubstrateGenesisRawPathTest(t)
genesisPtr, err := genesis.NewGenesisFromJSONRaw(genesisPath)
require.NoError(t, err)
Expand Down
2 changes: 2 additions & 0 deletions lib/grandpa/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import (

func newTestGenesisWithTrieAndHeader(t *testing.T) (
gen genesis.Genesis, genesisTrie trie.Trie, genesisHeader types.Header) {
t.Helper()

genesisPath := utils.GetGssmrV3SubstrateGenesisRawPathTest(t)
genesisPtr, err := genesis.NewGenesisFromJSONRaw(genesisPath)
require.NoError(t, err)
Expand Down

0 comments on commit f155179

Please sign in to comment.