Fix profiling endpoint and adding tests (#1917)

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
This commit is contained in:
Lenin Alevski
2022-04-27 20:07:32 -07:00
committed by GitHub
parent bd0edea3df
commit f026ffffc8
2 changed files with 122 additions and 2 deletions

View File

@@ -118,8 +118,7 @@ func stopProfiling(ctx context.Context, client MinioAdmin) (io.ReadCloser, error
// getProfilingStopResponse() performs setPolicy() and serializes it to the handler's output
func getProfilingStopResponse(session *models.Principal) (io.ReadCloser, *models.Error) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
ctx := context.Background()
mAdmin, err := NewMinioAdminClient(session)
if err != nil {
return nil, prepareError(err)