ax(node): rename tt to testCase in TestWorker_ConvertMinerStats_Good
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run

AX Principle 1 — predictable names over short names. `tt` is an
abbreviated loop variable; `testCase` states the semantic clearly.

Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 16:57:50 +01:00
parent 7b098da3be
commit b210b160d9
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

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