From 46353456f156d534288758f3e48e78b82f133783 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Tue, 26 Oct 2021 15:55:07 +0300 Subject: [PATCH] [#48] pool/test: add missing `EXPECT` calls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Another possible panic (though quite rare). ``` --- FAIL: TestTwoNodes (0.00s) pool.go:185: Unexpected call to *pool.MockClient.EndpointInfo([context.Background.WithCancel.WithDeadline(2021-10-26 15:50:50.005585875 +0300 MSK m=+1.216577808 [-940.323µs])]) at /home/dzeta/repo/neofs-sdk-go/pool/pool.go:185 because: there are no expected calls of the method "EndpointInfo" for that receiver pool.go:185: Unexpected call to *pool.MockClient.EndpointInfo([context.Background.WithCancel.WithDeadline(2021-10-26 15:50:50.005715623 +0300 MSK m=+1.216707547 [-1.351991ms])]) at /home/dzeta/repo/neofs-sdk-go/pool/pool.go:185 because: there are no expected calls of the method "EndpointInfo" for that receiver ``` Signed-off-by: Evgenii Stratonikov --- pool/pool_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pool/pool_test.go b/pool/pool_test.go index 2b6b3503..c549c253 100644 --- a/pool/pool_test.go +++ b/pool/pool_test.go @@ -152,6 +152,7 @@ func TestOneNode(t *testing.T) { clientBuilder := func(opts ...client.Option) (client.Client, error) { mockClient := NewMockClient(ctrl) mockClient.EXPECT().CreateSession(gomock.Any(), gomock.Any()).Return(tok, nil) + mockClient.EXPECT().EndpointInfo(gomock.Any(), gomock.Any()).Return(&client.EndpointInfo{}, nil).AnyTimes() return mockClient, nil } @@ -189,6 +190,7 @@ func TestTwoNodes(t *testing.T) { tokens = append(tokens, tok) return tok, err }) + mockClient.EXPECT().EndpointInfo(gomock.Any(), gomock.Any()).Return(&client.EndpointInfo{}, nil).AnyTimes() return mockClient, nil }