mirror of
https://github.com/unpoller/unpoller.git
synced 2026-04-05 08:54:09 -04:00
add integration test guard;
datadog integration test works influx package tests update unifi version golanglint-ci and address *all* issues. all tests pass bump unifi version
This commit is contained in:
@@ -62,19 +62,25 @@ func (u *UnifiPoller) DebugIO() error {
|
||||
defer outputSync.RUnlock()
|
||||
|
||||
allOK := true
|
||||
|
||||
var allErr error
|
||||
|
||||
u.Logf("Checking inputs...")
|
||||
|
||||
totalInputs := len(inputs)
|
||||
|
||||
for i, input := range inputs {
|
||||
u.Logf("\t(%d/%d) Checking input %s...", i+1, totalInputs, input.Name)
|
||||
|
||||
ok, err := input.DebugInput()
|
||||
if !ok {
|
||||
u.LogErrorf("\t\t %s Failed: %v", input.Name, err)
|
||||
|
||||
allOK = false
|
||||
} else {
|
||||
u.Logf("\t\t %s is OK", input.Name)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
if allErr == nil {
|
||||
allErr = err
|
||||
@@ -85,16 +91,21 @@ func (u *UnifiPoller) DebugIO() error {
|
||||
}
|
||||
|
||||
u.Logf("Checking outputs...")
|
||||
|
||||
totalOutputs := len(outputs)
|
||||
|
||||
for i, output := range outputs {
|
||||
u.Logf("\t(%d/%d) Checking output %s...", i+1, totalOutputs, output.Name)
|
||||
|
||||
ok, err := output.DebugOutput()
|
||||
if !ok {
|
||||
u.LogErrorf("\t\t %s Failed: %v", output.Name, err)
|
||||
|
||||
allOK = false
|
||||
} else {
|
||||
u.Logf("\t\t %s is OK", output.Name)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
if allErr == nil {
|
||||
allErr = err
|
||||
@@ -103,8 +114,10 @@ func (u *UnifiPoller) DebugIO() error {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if !allOK {
|
||||
u.LogErrorf("No all checks passed, please fix the logged issues.")
|
||||
}
|
||||
|
||||
return allErr
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user