(t *testing.T)
| 108 | } |
| 109 | |
| 110 | func TestTx_Close(t *testing.T) { |
| 111 | withDefaultDB(t, func(t *testing.T, db *DB) { |
| 112 | tx, err := db.Begin(false) |
| 113 | assert.NoError(t, err) |
| 114 | |
| 115 | err = tx.Rollback() |
| 116 | assert.NoError(t, err) |
| 117 | |
| 118 | bucket := "bucket_tx_close_test" |
| 119 | |
| 120 | _, err = tx.Get(bucket, []byte("foo")) |
| 121 | assert.Errorf(t, err, "err TestTx_Close") |
| 122 | |
| 123 | _, err = tx.RangeScan(bucket, []byte("foo0"), []byte("foo1")) |
| 124 | assert.Errorf(t, err, "err TestTx_Close") |
| 125 | |
| 126 | _, err = tx.PrefixScan(bucket, []byte("foo"), 0, 1) |
| 127 | assert.Errorf(t, err, "err TestTx_Close") |
| 128 | |
| 129 | _, err = tx.PrefixSearchScan(bucket, []byte("f"), "oo", 0, 1) |
| 130 | assert.Errorf(t, err, "err TestTx_Close") |
| 131 | }) |
| 132 | } |
| 133 | |
| 134 | func TestTx_CommittedStatus(t *testing.T) { |
| 135 |
nothing calls this directly
no test coverage detected