MCPcopy
hub / github.com/containerd/containerd / newDatabase

Function newDatabase

core/metadata/gc_test.go:699–712  ·  view source on GitHub ↗
(t testing.TB)

Source from the content-addressed store, hash-verified

697}
698
699func 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
714func 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()

Callers 4

TestGCRootsFunction · 0.85
TestGCRemoveFunction · 0.85
TestGCRefsFunction · 0.85
TestCollectibleResourcesFunction · 0.85

Calls 3

CleanupMethod · 0.65
CloseMethod · 0.65
OpenMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…