Browse Source

Merge pull request #119 from AlphaB/issue-95

Resolve go vet problems
pull/121/head
Julius Volz 9 years ago
parent
commit
7de03b8d6b
  1. 2
      collector/mdadm_test.go
  2. 6
      collector/megacli_test.go

2
collector/mdadm_test.go

@ -28,6 +28,6 @@ func TestMdadm(t *testing.T) {
} }
if len(mdStates) != len(refs) { if len(mdStates) != len(refs) {
t.Errorf("expected number of parsed md-device to be %s, but was %s", len(refs), len(mdStates)) t.Errorf("expected number of parsed md-device to be %d, but was %d", len(refs), len(mdStates))
} }
} }

6
collector/megacli_test.go

@ -29,11 +29,11 @@ func TestMegaCliAdapter(t *testing.T) {
} }
if stats["Device Present"]["Physical Devices"] != physicalDevicesExpected { if stats["Device Present"]["Physical Devices"] != physicalDevicesExpected {
t.Fatalf("Unexpected device count: %d != %d", stats["Device Present"]["Physical Devices"], physicalDevicesExpected) t.Fatalf("Unexpected device count: %s != %s", stats["Device Present"]["Physical Devices"], physicalDevicesExpected)
} }
if stats["Device Present"]["Degraded"] != virtualDevicesDegraded { if stats["Device Present"]["Degraded"] != virtualDevicesDegraded {
t.Fatal() t.Fatalf("Unexpected degraded device count: %s != %s", stats["Device Present"]["Degraded"], virtualDevicesDegraded)
} }
} }
@ -56,7 +56,7 @@ func TestMegaCliDisks(t *testing.T) {
} }
if stats[32][3]["Predictive Failure Count"] != "23" { if stats[32][3]["Predictive Failure Count"] != "23" {
t.Fatal() t.Fatalf("Unexpected predictive failure count: %s", stats[32][3]["Predictive Failure Count"])
} }
} }

Loading…
Cancel
Save