diff --git a/go.mod b/go.mod index a8f2307..b2b4fba 100644 --- a/go.mod +++ b/go.mod @@ -1,12 +1,10 @@ module github.com/linode/docker-machine-driver-linode -go 1.24.0 - -toolchain go1.24.1 +go 1.24.11 // This replacement is necessary to support Docker versions > v20.x.x // which provide critical security fixes. -replace github.com/docker/machine => gitlab.com/gitlab-org/ci-cd/docker-machine v0.16.2-gitlab.27 +replace github.com/docker/machine => gitlab.com/gitlab-org/ci-cd/docker-machine v0.16.2-gitlab.43 require ( github.com/docker/machine v0.16.2 diff --git a/go.sum b/go.sum index 09416ae..84b4a24 100644 --- a/go.sum +++ b/go.sum @@ -23,8 +23,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= -gitlab.com/gitlab-org/ci-cd/docker-machine v0.16.2-gitlab.27 h1:6XE5SIyDteS5BFR3EhlEt7UUBhkcf77loHYWaVS4BHM= -gitlab.com/gitlab-org/ci-cd/docker-machine v0.16.2-gitlab.27/go.mod h1:WX9wJGY7+MC7527nUL2hvFOLNlowPeNjeiLtX5B6MnQ= +gitlab.com/gitlab-org/ci-cd/docker-machine v0.16.2-gitlab.43 h1:3AOpTvIZHfvNnCEaPvmMTiX65gY3yYtpabcAZJUgsTE= +gitlab.com/gitlab-org/ci-cd/docker-machine v0.16.2-gitlab.43/go.mod h1:WDpNHYkfs5yjw3iwSBFrFrsGZRGf2hPjkLVCbCvJvj8= golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8= golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A= golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= diff --git a/pkg/drivers/linode/linode.go b/pkg/drivers/linode/linode.go index 297ef98..096c6df 100644 --- a/pkg/drivers/linode/linode.go +++ b/pkg/drivers/linode/linode.go @@ -102,17 +102,21 @@ func (d *Driver) getClient() *linodego.Client { } client.SetUserAgent(ua) - client.SetDebug(true) d.client = &client } return d.client } +// SetClient sets the Linode API client for the driver +func (d *Driver) SetClient(client *linodego.Client) { + d.client = client +} + func createRandomRootPassword() (string, error) { rawRootPass := make([]byte, 50) _, err := rand.Read(rawRootPass) if err != nil { - return "", fmt.Errorf("Failed to generate random password") + return "", errors.New("Failed to generate random password") } rootPass := base64.StdEncoding.EncodeToString(rawRootPass) return rootPass, nil