Fixes to compile errors for new interface.

This commit is contained in:
Adam Kaplan 2015-10-21 14:35:06 -04:00
parent 4f8dba9d9d
commit 850b4536a9
2 changed files with 11 additions and 3 deletions

View File

@ -98,7 +98,7 @@ func (store *FileStore) Terminate(id string) error {
return nil
}
func (store *FileStore) LockFile(id string) (hasLock bool, err) {
func (store *FileStore) LockFile(id string) (hasLock bool, err error) {
info, err := store.GetInfo(id)
if err != nil {
hasLock = false
@ -110,7 +110,7 @@ func (store *FileStore) LockFile(id string) (hasLock bool, err) {
return
}
info.Locked = true
err = writeInfo(id, info)
err = store.writeInfo(id, info)
if err != nil {
hasLock = false
return
@ -125,7 +125,7 @@ func (store *FileStore) UnlockFile(id string) (err error) {
return
}
info.Locked = false
err = writeInfo(info)
err = store.writeInfo(id, info)
return
}

View File

@ -49,6 +49,14 @@ func (store *dataStore) Terminate(id string) error {
return nil
}
func (store *dataStore) LockFile(id string) (bool, error) {
return true, nil
}
func (store *dataStore) UnlockFile(id string) (error) {
return nil
}
func TestLimitedStore(t *testing.T) {
dataStore := &dataStore{
t: t,