Skip to content

Commit

Permalink
Revert "add context to http.NewRequest"
Browse files Browse the repository at this point in the history
This would break e2e tests since it was for whatever reason try to do
https and we don't have ssl certs on e2e tests service

This reverts commit 522c2df.

Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
  • Loading branch information
chmouel committed Jul 26, 2022
1 parent 55e8712 commit 12c21ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/matcher/annotation_tasks_install.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"errors"
"fmt"
"io/ioutil"
"net/http"
"os"
"regexp"
"strings"
Expand Down Expand Up @@ -49,8 +48,9 @@ func (rt RemoteTasks) getTask(ctx context.Context, logger *zap.SugaredLogger, pr
// TODO: print a log info when getting the task from which location
switch {
case strings.HasPrefix(task, "https://"), strings.HasPrefix(task, "http://"):
req, _ := http.NewRequestWithContext(ctx, http.MethodGet, task, nil)
res, err := rt.Run.Clients.HTTP.Do(req)
// TODO: figure out to add context and not break e2e test which doesn't have ssl
// nolint: noctx
res, err := rt.Run.Clients.HTTP.Get(task)
if err != nil {
return ret, err
}
Expand Down

0 comments on commit 12c21ee

Please sign in to comment.