(t *testing.T, dbPath, query string)
| 1483 | } |
| 1484 | |
| 1485 | func mustQueryDB(t *testing.T, dbPath, query string) string { |
| 1486 | t.Helper() |
| 1487 | checkDB, err := db.Open(dbPath, false, true) |
| 1488 | if err != nil { |
| 1489 | t.Fatalf("failed to open database at %s: %s", dbPath, err) |
| 1490 | } |
| 1491 | defer checkDB.Close() |
| 1492 | rows, err := checkDB.QueryStringStmt(query) |
| 1493 | if err != nil { |
| 1494 | t.Fatalf("failed to query database: %s", err) |
| 1495 | } |
| 1496 | return asJSON(rows) |
| 1497 | } |
| 1498 | |
| 1499 | func Test_StoreRegisterObserver(t *testing.T) { |
| 1500 | dir := t.TempDir() |
no test coverage detected