MCPcopy
hub / github.com/etcd-io/bbolt / TestDB_Begin_ErrDatabaseNotOpen

Function TestDB_Begin_ErrDatabaseNotOpen

db_test.go:685–690  ·  view source on GitHub ↗

Ensure that a database cannot open a transaction when it's not open.

(t *testing.T)

Source from the content-addressed store, hash-verified

683
684// Ensure that a database cannot open a transaction when it's not open.
685func TestDB_Begin_ErrDatabaseNotOpen(t *testing.T) {
686 var db bolt.DB
687 if _, err := db.Begin(false); err != berrors.ErrDatabaseNotOpen {
688 t.Fatalf("unexpected error: %s", err)
689 }
690}
691
692// Ensure that a read-write transaction can be retrieved.
693func TestDB_BeginRW(t *testing.T) {

Callers

nothing calls this directly

Calls 2

BeginMethod · 0.95
FatalfMethod · 0.65

Tested by

no test coverage detected