forked from TrueCloudLab/frostfs-sdk-go
[#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:
parent
1395b282fe
commit
4cd755877c
2 changed files with 0 additions and 10 deletions
|
@ -233,11 +233,6 @@ func (x ResNetMapSnapshot) NetMap() netmap.NetMap {
|
||||||
// Return statuses:
|
// Return statuses:
|
||||||
// - global (see Client docs).
|
// - global (see Client docs).
|
||||||
func (c *Client) NetMapSnapshot(ctx context.Context, _ PrmNetMapSnapshot) (*ResNetMapSnapshot, error) {
|
func (c *Client) NetMapSnapshot(ctx context.Context, _ PrmNetMapSnapshot) (*ResNetMapSnapshot, error) {
|
||||||
// check context
|
|
||||||
if ctx == nil {
|
|
||||||
return nil, errorMissingContext
|
|
||||||
}
|
|
||||||
|
|
||||||
// form request body
|
// form request body
|
||||||
var body v2netmap.SnapshotRequestBody
|
var body v2netmap.SnapshotRequestBody
|
||||||
|
|
||||||
|
|
|
@ -69,11 +69,6 @@ func TestClient_NetMapSnapshot(t *testing.T) {
|
||||||
c := newClient(&srv)
|
c := newClient(&srv)
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
|
|
||||||
// missing context
|
|
||||||
//nolint:staticcheck
|
|
||||||
_, err = c.NetMapSnapshot(nil, prm)
|
|
||||||
require.ErrorIs(t, err, errorMissingContext, "")
|
|
||||||
|
|
||||||
// request signature
|
// request signature
|
||||||
srv.errTransport = errors.New("any error")
|
srv.errTransport = errors.New("any error")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue