From b210b160d97296119c1edce38751a5d7effcfeff Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 16:57:50 +0100 Subject: [PATCH] ax(node): rename tt to testCase in TestWorker_ConvertMinerStats_Good MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AX Principle 1 — predictable names over short names. `tt` is an abbreviated loop variable; `testCase` states the semantic clearly. Co-Authored-By: Charon --- pkg/node/worker_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/node/worker_test.go b/pkg/node/worker_test.go index 036721c..c6db901 100644 --- a/pkg/node/worker_test.go +++ b/pkg/node/worker_test.go @@ -893,16 +893,16 @@ func TestWorker_ConvertMinerStats_Good(t *testing.T) { }, } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { + for _, testCase := range tests { + t.Run(testCase.name, func(t *testing.T) { mock := &mockMinerInstance{name: "test", minerType: "xmrig"} - result := convertMinerStats(mock, tt.rawStats) + result := convertMinerStats(mock, testCase.rawStats) if result.Name != "test" { t.Errorf("expected name 'test', got '%s'", result.Name) } - if result.Hashrate != tt.wantHash { - t.Errorf("expected hashrate %f, got %f", tt.wantHash, result.Hashrate) + if result.Hashrate != testCase.wantHash { + t.Errorf("expected hashrate %f, got %f", testCase.wantHash, result.Hashrate) } }) }