remove TLS bypass and rename import

feat/registry-client
nils måsén 2 years ago
parent a762ec39aa
commit 72589feffd

@ -7,7 +7,6 @@ import (
"github.com/containrrr/watchtower/pkg/container/mocks" "github.com/containrrr/watchtower/pkg/container/mocks"
"github.com/containrrr/watchtower/pkg/filters" "github.com/containrrr/watchtower/pkg/filters"
"github.com/containrrr/watchtower/pkg/registry" "github.com/containrrr/watchtower/pkg/registry"
t "github.com/containrrr/watchtower/pkg/types"
wt "github.com/containrrr/watchtower/pkg/types" wt "github.com/containrrr/watchtower/pkg/types"
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
@ -295,7 +294,7 @@ var _ = Describe("the client", func() {
logrus.SetOutput(logbuf) logrus.SetOutput(logbuf)
user := "" user := ""
containerID := t.ContainerID("ex-cont-id") containerID := wt.ContainerID("ex-cont-id")
execID := "ex-exec-id" execID := "ex-exec-id"
cmd := "exec-cmd" cmd := "exec-cmd"

@ -1,7 +1,6 @@
package registry package registry
import ( import (
"crypto/tls"
"net" "net"
"net/http" "net/http"
"time" "time"
@ -34,7 +33,6 @@ func NewClient() *Client {
IdleConnTimeout: 90 * time.Second, IdleConnTimeout: 90 * time.Second,
TLSHandshakeTimeout: 10 * time.Second, TLSHandshakeTimeout: 10 * time.Second,
ExpectContinueTimeout: 1 * time.Second, ExpectContinueTimeout: 1 * time.Second,
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
} }
return NewClientWithHTTPClient(&http.Client{Transport: tr}) return NewClientWithHTTPClient(&http.Client{Transport: tr})
} }

Loading…
Cancel
Save