X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/52cca9dc7c50ef8c54c9dc83a2ccf0129c27485e..8626abb0a44cfc303bef3552a7bc57163c79231a:/services/keepstore/volume_test.go diff --git a/services/keepstore/volume_test.go b/services/keepstore/volume_test.go index 2907225575..f272c84c83 100644 --- a/services/keepstore/volume_test.go +++ b/services/keepstore/volume_test.go @@ -52,7 +52,7 @@ type MockVolume struct { // channel unblocks all operations. By default, Gate is a // closed channel, so all operations proceed without // blocking. See trash_worker_test.go for an example. - Gate chan struct{} + Gate chan struct{} called map[string]int mutex sync.Mutex @@ -78,11 +78,11 @@ func CreateMockVolume() *MockVolume { func (v *MockVolume) CallCount(method string) int { v.mutex.Lock() defer v.mutex.Unlock() - if c, ok := v.called[method]; !ok { + c, ok := v.called[method] + if !ok { return 0 - } else { - return c } + return c } func (v *MockVolume) gotCall(method string) { @@ -190,7 +190,7 @@ func (v *MockVolume) Delete(loc string) error { return MethodDisabledError } if _, ok := v.Store[loc]; ok { - if time.Since(v.Timestamps[loc]) < blob_signature_ttl { + if time.Since(v.Timestamps[loc]) < blobSignatureTTL { return nil } delete(v.Store, loc)