[#47] client: Do not check context in NetmapSnapshot()

It is passed explicitly, non-nil by convention.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2023-04-07 08:28:53 +03:00
parent 1395b282fe
commit 4cd755877c
2 changed files with 0 additions and 10 deletions

View file

@ -233,11 +233,6 @@ func (x ResNetMapSnapshot) NetMap() netmap.NetMap {
// Return statuses:
// - global (see Client docs).
func (c *Client) NetMapSnapshot(ctx context.Context, _ PrmNetMapSnapshot) (*ResNetMapSnapshot, error) {
// check context
if ctx == nil {
return nil, errorMissingContext
}
// form request body
var body v2netmap.SnapshotRequestBody

View file

@ -69,11 +69,6 @@ func TestClient_NetMapSnapshot(t *testing.T) {
c := newClient(&srv)
ctx := context.Background()
// missing context
//nolint:staticcheck
_, err = c.NetMapSnapshot(nil, prm)
require.ErrorIs(t, err, errorMissingContext, "")
// request signature
srv.errTransport = errors.New("any error")