satellite/console/consoleweb/consoleapi: fix defer in loop

Change-Id: Ifdedad8a5556be47b5f99dc8d8a8ff67904e2688
This commit is contained in:
Egon Elbre 2023-10-05 12:55:36 +03:00
parent 800bba7a0e
commit 27a13efb17
2 changed files with 2 additions and 4 deletions

View File

@ -125,6 +125,7 @@ pipeline {
sh 'check-atomic-align ./...'
sh 'check-monkit ./...'
sh 'check-errs ./...'
sh 'check-deferloop ./...'
sh 'staticcheck ./...'
sh 'golangci-lint --config /go/ci/.golangci.yml -j=2 run'
sh 'check-downgrades'

View File

@ -215,10 +215,7 @@ func TestAuth_RegisterWithInvitation(t *testing.T) {
req.Header.Set("Content-Type", "application/json")
result, err := http.DefaultClient.Do(req)
require.NoError(t, err)
defer func() {
err = result.Body.Close()
require.NoError(t, err)
}()
require.NoError(t, result.Body.Close())
require.Equal(t, http.StatusOK, result.StatusCode)
require.Len(t, planet.Satellites, 1)
// this works only because we configured 'nomail' above. Mail send simulator won't click to activation link.