From c1fc812a383b4d4cf8310cb0197f552d3c2db9d8 Mon Sep 17 00:00:00 2001 From: kilavvy <140459108+kilavvy@users.noreply.github.com> Date: Tue, 1 Apr 2025 20:31:59 +0200 Subject: [PATCH] Fix typos in test code (#14991) * Update keymanager_test.go * Update fork_test.go * Update README.md * Update README.md --- monitoring/clientstats/README.md | 2 +- network/forks/fork_test.go | 20 +++++++++---------- .../keymanager/derived/keymanager_test.go | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/monitoring/clientstats/README.md b/monitoring/clientstats/README.md index 1192bed13e..4dc99a3718 100644 --- a/monitoring/clientstats/README.md +++ b/monitoring/clientstats/README.md @@ -38,7 +38,7 @@ The request JSON object is a non-nested object with the following properties. Th |memory_node_bytes_total |long |system |(currently unsupported) |?? | |memory_node_bytes_free |long |system |(currently unsupported) |?? | |memory_node_bytes_cached |long |system |(currently unsupported) |?? | -|memory_node_bytes_bufferd |long |system |(currently unsupported) |?? | +|memory_node_bytes_buffers |long |system |(currently unsupported) |?? | |disk_node_bytes_total |long |system |(currently unsupported) |?? | |disk_node_bytes_free |long |system |(currently unsupported) |?? | |disk_node_io_seconds |long |system |(currently unsupported) |?? | diff --git a/network/forks/fork_test.go b/network/forks/fork_test.go index 5d7672ff39..2e3fdb174c 100644 --- a/network/forks/fork_test.go +++ b/network/forks/fork_test.go @@ -255,13 +255,13 @@ func TestNextForkData(t *testing.T) { name string setConfg func() currEpoch primitives.Epoch - wantedForkVerison [4]byte + wantedForkVersion [4]byte wantedEpoch primitives.Epoch }{ { name: "genesis fork", currEpoch: 0, - wantedForkVerison: [4]byte{'A', 'B', 'C', 'D'}, + wantedForkVersion: [4]byte{'A', 'B', 'C', 'D'}, wantedEpoch: math.MaxUint64, setConfg: func() { cfg = cfg.Copy() @@ -275,7 +275,7 @@ func TestNextForkData(t *testing.T) { { name: "altair pre-fork", currEpoch: 5, - wantedForkVerison: [4]byte{'A', 'B', 'C', 'F'}, + wantedForkVersion: [4]byte{'A', 'B', 'C', 'F'}, wantedEpoch: 10, setConfg: func() { cfg = cfg.Copy() @@ -291,7 +291,7 @@ func TestNextForkData(t *testing.T) { { name: "altair on fork", currEpoch: 10, - wantedForkVerison: [4]byte{'A', 'B', 'C', 'F'}, + wantedForkVersion: [4]byte{'A', 'B', 'C', 'F'}, wantedEpoch: math.MaxUint64, setConfg: func() { cfg = cfg.Copy() @@ -308,7 +308,7 @@ func TestNextForkData(t *testing.T) { { name: "altair post fork", currEpoch: 20, - wantedForkVerison: [4]byte{'A', 'B', 'C', 'F'}, + wantedForkVersion: [4]byte{'A', 'B', 'C', 'F'}, wantedEpoch: math.MaxUint64, setConfg: func() { cfg = cfg.Copy() @@ -325,7 +325,7 @@ func TestNextForkData(t *testing.T) { { name: "3 forks, pre-fork, 1st fork", currEpoch: 5, - wantedForkVerison: [4]byte{'A', 'B', 'C', 'F'}, + wantedForkVersion: [4]byte{'A', 'B', 'C', 'F'}, wantedEpoch: 10, setConfg: func() { cfg = cfg.Copy() @@ -341,7 +341,7 @@ func TestNextForkData(t *testing.T) { { name: "3 forks, pre-fork, 2nd fork", currEpoch: 50, - wantedForkVerison: [4]byte{'A', 'B', 'C', 'Z'}, + wantedForkVersion: [4]byte{'A', 'B', 'C', 'Z'}, wantedEpoch: 100, setConfg: func() { cfg = cfg.Copy() @@ -357,7 +357,7 @@ func TestNextForkData(t *testing.T) { { name: "3 forks, on fork", currEpoch: 100, - wantedForkVerison: [4]byte{'A', 'B', 'C', 'Z'}, + wantedForkVersion: [4]byte{'A', 'B', 'C', 'Z'}, wantedEpoch: math.MaxUint64, setConfg: func() { cfg = cfg.Copy() @@ -376,8 +376,8 @@ func TestNextForkData(t *testing.T) { tt.setConfg() fVersion, fEpoch, err := NextForkData(tt.currEpoch) assert.NoError(t, err) - if fVersion != tt.wantedForkVerison { - t.Errorf("NextForkData() fork version = %v, want %v", fVersion, tt.wantedForkVerison) + if fVersion != tt.wantedForkVersion { + t.Errorf("NextForkData() fork version = %v, want %v", fVersion, tt.wantedForkVersion) } if fEpoch != tt.wantedEpoch { t.Errorf("NextForkData() fork epoch = %v, want %v", fEpoch, tt.wantedEpoch) diff --git a/validator/keymanager/derived/keymanager_test.go b/validator/keymanager/derived/keymanager_test.go index 96cbe61f37..006db65a27 100644 --- a/validator/keymanager/derived/keymanager_test.go +++ b/validator/keymanager/derived/keymanager_test.go @@ -23,7 +23,7 @@ const ( // We test that using a '25th word' mnemonic passphrase leads to different // public keys derived than not specifying the passphrase. -func TestDerivedKeymanager_MnemnonicPassphrase_DifferentResults(t *testing.T) { +func TestDerivedKeymanager_MnemonicPassphrase_DifferentResults(t *testing.T) { ctx := context.Background() wallet := &mock.Wallet{ Files: make(map[string]map[string][]byte),