Issue #202: Fix mock informer

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
This commit is contained in:
Hector Sanjuan 2017-10-26 15:47:03 +02:00
parent 5fb0753aed
commit 5831b251fe
2 changed files with 4 additions and 4 deletions

View File

@ -43,13 +43,13 @@ func badRPCClient(t *testing.T) *rpc.Client {
// return nil
// }
func (mock *badRPCService) IPFSRepoSize(in struct{}, out *int) error {
func (mock *badRPCService) IPFSRepoSize(in struct{}, out *uint64) error {
*out = 2
mock.nthCall++
return errors.New("fake error")
}
func (mock *badRPCService) IPFSFreeSpace(in struct{}, out *int) error {
func (mock *badRPCService) IPFSFreeSpace(in struct{}, out *uint64) error {
*out = 2
mock.nthCall++
return errors.New("fake error")

View File

@ -263,13 +263,13 @@ func (mock *mockService) IPFSConfigKey(in string, out *interface{}) error {
return nil
}
func (mock *mockService) IPFSRepoSize(in struct{}, out *int) error {
func (mock *mockService) IPFSRepoSize(in struct{}, out *uint64) error {
// since we have two pins. Assume each is 1KB.
*out = 2000
return nil
}
func (mock *mockService) IPFSFreeSpace(in struct{}, out *int) error {
func (mock *mockService) IPFSFreeSpace(in struct{}, out *uint64) error {
// RepoSize is 2KB, StorageMax is 100KB
*out = 98000
return nil