store: A1 — check rows.Err() + Scan err in migrate_test
Code-quality nits flagged in review of e6d965d. Mirrors the existing
pattern in host_credentials_test.go.
This commit is contained in:
@@ -24,9 +24,14 @@ func TestMigration0013AlertsLastSeen(t *testing.T) {
|
||||
cols := map[string]bool{}
|
||||
for rows.Next() {
|
||||
var n string
|
||||
_ = rows.Scan(&n)
|
||||
if err := rows.Scan(&n); err != nil {
|
||||
t.Fatalf("scan: %v", err)
|
||||
}
|
||||
cols[n] = true
|
||||
}
|
||||
if err := rows.Err(); err != nil {
|
||||
t.Fatalf("rows iter: %v", err)
|
||||
}
|
||||
if !cols["last_seen_at"] {
|
||||
t.Fatalf("alerts.last_seen_at not present after migration; cols=%v", cols)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user