diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2014-03-21 13:21:33 -0600 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2014-03-21 13:21:33 -0600 |
commit | d2173f5f0ecbf4ed93c768e975435b04df3186ec (patch) | |
tree | ae6279c471e965b1ad14ac68a5621de00aad22b4 /syscall_linux_test.go | |
parent | Merge pull request #68 from benbjohnson/remove-db-functions (diff) | |
download | dedo-d2173f5f0ecbf4ed93c768e975435b04df3186ec.tar.gz dedo-d2173f5f0ecbf4ed93c768e975435b04df3186ec.tar.xz |
Fix db.munmap() to return an error.
Changes munmap to return an error and the DB now implements io.Closer.
I also removed all the OS and Syscall mocking because it's causing issues.
Corrupt file tests need to be recreated but directly using the file system
instead.
Diffstat (limited to 'syscall_linux_test.go')
-rw-r--r-- | syscall_linux_test.go | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/syscall_linux_test.go b/syscall_linux_test.go deleted file mode 100644 index 6b468f6..0000000 --- a/syscall_linux_test.go +++ /dev/null @@ -1,19 +0,0 @@ -package bolt - -import ( - "github.com/stretchr/testify/mock" -) - -type mocksyscall struct { - mock.Mock -} - -func (m *mocksyscall) Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) { - args := m.Called(fd, offset, length, prot, flags) - return args.Get(0).([]byte), args.Error(1) -} - -func (m *mocksyscall) Munmap(b []byte) error { - args := m.Called(b) - return args.Error(0) -} |