Remove redundant constructor, h/t sergio
This commit is contained in:
@@ -45,4 +45,4 @@ func StartAgentXRoutine(interfaceMIB *ifmib.InterfaceMIB) error {
|
||||
|
||||
logger.Printf("Successfully registered with AgentX at %s://%s", network, address)
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ func TestAgentXAddrFlagParsing(t *testing.T) {
|
||||
// Test Unix socket path
|
||||
testAddr := "/var/run/test.sock"
|
||||
*AgentXAddr = testAddr
|
||||
|
||||
|
||||
if *AgentXAddr != testAddr {
|
||||
t.Errorf("Expected AgentX address to be '%s', got '%s'", testAddr, *AgentXAddr)
|
||||
}
|
||||
@@ -30,7 +30,7 @@ func TestAgentXAddrFlagParsing(t *testing.T) {
|
||||
// Test TCP address
|
||||
testAddr = "192.168.1.1:705"
|
||||
*AgentXAddr = testAddr
|
||||
|
||||
|
||||
if *AgentXAddr != testAddr {
|
||||
t.Errorf("Expected AgentX address to be '%s', got '%s'", testAddr, *AgentXAddr)
|
||||
}
|
||||
@@ -43,12 +43,12 @@ func TestFlagRegistration(t *testing.T) {
|
||||
t.Error("Expected agentx.addr flag to be registered")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
if f.DefValue != "localhost:705" {
|
||||
t.Errorf("Expected flag default value to be 'localhost:705', got '%s'", f.DefValue)
|
||||
}
|
||||
|
||||
|
||||
if f.Usage != "Address to connect to (hostname:port or Unix socket path)" {
|
||||
t.Errorf("Unexpected flag usage string: %s", f.Usage)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user