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) } }) }