Issue #202: Fix mock informer
License: MIT Signed-off-by: Hector Sanjuan <hector@protocol.ai>
This commit is contained in:
parent
5fb0753aed
commit
5831b251fe
|
@ -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")
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user