ax(mining): replace prose comments with usage examples in manager_test.go
AX Principle 2: comments must show HOW with real values, not restate the function name. Four prose comments replaced with concrete call examples showing inputs and expected outcomes. Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
parent
ea40c035b5
commit
889636fff4
1 changed files with 4 additions and 4 deletions
|
|
@ -40,7 +40,7 @@ func setupTestManager(t *testing.T) *Manager {
|
|||
return NewManager()
|
||||
}
|
||||
|
||||
// TestStartMiner tests the StartMiner function
|
||||
// miner, err := m.StartMiner(ctx, "xmrig", config)
|
||||
func TestStartMiner_Good(t *testing.T) {
|
||||
t.Skip("Skipping test that runs miner process as per request")
|
||||
}
|
||||
|
|
@ -66,7 +66,7 @@ func TestStartMiner_Ugly(t *testing.T) {
|
|||
t.Skip("Skipping test that runs miner process")
|
||||
}
|
||||
|
||||
// TestStopMiner tests the StopMiner function
|
||||
// err := m.StopMiner(ctx, "xmrig"); // stops and removes the named miner
|
||||
func TestStopMiner_Good(t *testing.T) {
|
||||
t.Skip("Skipping test that runs miner process")
|
||||
}
|
||||
|
|
@ -82,7 +82,7 @@ func TestStopMiner_Bad(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
// TestGetMiner tests the GetMiner function
|
||||
// miner, err := m.GetMiner("xmrig"); miner.GetName() == "xmrig"
|
||||
func TestGetMiner_Good(t *testing.T) {
|
||||
m := setupTestManager(t)
|
||||
defer m.Stop()
|
||||
|
|
@ -116,7 +116,7 @@ func TestGetMiner_Bad(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
// TestListMiners tests the ListMiners function
|
||||
// miners := m.ListMiners(); len(miners) == 1 after injecting one miner
|
||||
func TestListMiners_Good(t *testing.T) {
|
||||
m := setupTestManager(t)
|
||||
defer m.Stop()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue