diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2014-01-31 09:27:18 -0800 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2014-01-31 09:27:18 -0800 |
commit | b17d078d4f2de023016d7130a8620efa2b03eda1 (patch) | |
tree | b270b94589bab6b3e39f07886d30b52427b6b23d /rwtransaction_test.go | |
parent | Merge pull request #3 from benbjohnson/spill (diff) | |
parent | Clean up API. (diff) | |
download | dedo-b17d078d4f2de023016d7130a8620efa2b03eda1.tar.gz dedo-b17d078d4f2de023016d7130a8620efa2b03eda1.tar.xz |
Merge pull request #4 from benbjohnson/api
Clean up API.
Diffstat (limited to 'rwtransaction_test.go')
-rw-r--r-- | rwtransaction_test.go | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/rwtransaction_test.go b/rwtransaction_test.go index 2bcf252..b6e971e 100644 --- a/rwtransaction_test.go +++ b/rwtransaction_test.go @@ -19,28 +19,12 @@ func TestRWTransaction(t *testing.T) { func TestTransactionCreateBucket(t *testing.T) { withOpenDB(func(db *DB, path string) { // Create a bucket. - txn, _ := db.RWTransaction() - err := txn.CreateBucket("widgets") + err := db.CreateBucket("widgets") assert.NoError(t, err) - // Commit the transaction. - err = txn.Commit() + // Read the bucket through a separate transaction. + b, err := db.Bucket("widgets") + assert.NotNil(t, b) assert.NoError(t, err) - - // Open a separate read-only transaction. - rtxn, err := db.Transaction() - assert.NotNil(t, txn) - assert.NoError(t, err) - - b := rtxn.Bucket("widgets") - assert.NoError(t, err) - if assert.NotNil(t, b) { - assert.Equal(t, b.Name(), "widgets") - } }) } - -// Ensure that an existing bucket cannot be created. -func TestTransactionCreateExistingBucket(t *testing.T) { - t.Skip("pending") -} |