ax(mining): fix test naming and comment style in dual_mining_test.go
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run

Rename flat test functions to TestFilename_Function_{Good,Bad,Ugly} pattern
and replace prose description comments with usage-example comments per AX
principles 1 and 2.

Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 16:13:48 +01:00
parent 53654cffbc
commit 2cccc32375
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -6,9 +6,8 @@ import (
"time"
)
// TestDualMiningCPUAndGPU tests running CPU and GPU mining together
// This test requires XMRig installed and a GPU with OpenCL support
func TestDualMiningCPUAndGPU(t *testing.T) {
// manager.StartMiner(ctx, "xmrig", &Config{GPUEnabled: true, OpenCL: true, Devices: "0"})
func TestDualMining_CPUAndGPU_Good(t *testing.T) {
if testing.Short() {
t.Skip("Skipping dual mining test in short mode")
}
@ -73,8 +72,8 @@ func TestDualMiningCPUAndGPU(t *testing.T) {
manager.StopMiner(context.Background(), minerInstance.GetName())
}
// TestGPUDeviceSelection tests that GPU mining requires explicit device selection
func TestGPUDeviceSelection(t *testing.T) {
// miner.createConfig(&Config{GPUEnabled: true, OpenCL: true}) // no Devices → GPU disabled
func TestDualMining_GPUDeviceSelection_Bad(t *testing.T) {
tmpDir := t.TempDir()
miner := &XMRigMiner{