(t testing.TB)
| 697 | } |
| 698 | |
| 699 | func newDatabase(t testing.TB) (*bolt.DB, error) { |
| 700 | td := t.TempDir() |
| 701 | |
| 702 | db, err := bolt.Open(filepath.Join(td, "test.db"), 0777, nil) |
| 703 | if err != nil { |
| 704 | return nil, err |
| 705 | } |
| 706 | |
| 707 | t.Cleanup(func() { |
| 708 | assert.NoError(t, db.Close()) |
| 709 | }) |
| 710 | |
| 711 | return db, nil |
| 712 | } |
| 713 | |
| 714 | func checkNodeC(ctx context.Context, t *testing.T, db *bolt.DB, expected []gc.Node, fn func(context.Context, *bolt.Tx, chan<- gc.Node) error) { |
| 715 | t.Helper() |
no test coverage detected
searching dependent graphs…