Commit 151efc37 authored by Yura Beznos's avatar Yura Beznos

fix: go format fix

parent e8de970d
Pipeline #40253353 passed with stages
in 28 minutes and 23 seconds
package common
import (
"bytes"
"bytes"
"context"
"errors"
"fmt"
......@@ -12,11 +12,11 @@ import (
"strings"
"time"
"github.com/docker/docker/api/types"
"github.com/sirupsen/logrus"
"github.com/docker/docker/api/types"
"gitlab.com/gitlab-org/gitlab-runner/helpers"
docker_helpers "gitlab.com/gitlab-org/gitlab-runner/helpers/docker"
docker_helpers "gitlab.com/gitlab-org/gitlab-runner/helpers/docker"
"gitlab.com/gitlab-org/gitlab-runner/helpers/tls"
"gitlab.com/gitlab-org/gitlab-runner/session"
"gitlab.com/gitlab-org/gitlab-runner/session/terminal"
......
......@@ -87,7 +87,7 @@ func (e *executor) getUserAuthConfiguration(indexName string) *types.AuthConfig
return nil
}
authConfigs, _ := e.Build.GetDockerAuthConfig()
authConfigs, _ := e.Build.GetDockerAuthConfig()
if authConfigs != nil {
return docker_helpers.ResolveDockerAuthConfig(indexName, authConfigs)
}
......
......@@ -421,7 +421,7 @@ func (s *executor) getBuildAuthConfiguration() map[string]dockerConfigEntry {
}
}
return authConfigs
return authConfigs
}
func (s *executor) getUserAuthConfiguration() map[string]dockerConfigEntry {
......@@ -464,7 +464,7 @@ func (s *executor) setupCredentials() error {
return nil
}
dockerCfgContent, err := json.Marshal(dockerConfigEntries)
dockerCfgContent, err := json.Marshal(dockerConfigEntries)
if err != nil {
return err
}
......
......@@ -892,7 +892,7 @@ func TestSetupCredentials(t *testing.T) {
version, _ := testVersionAndCodec()
type testDef struct {
RunnerCredentials *common.RunnerCredentials
RunnerCredentials *common.RunnerCredentials
Credentials []common.Credentials
DockerAuthConfigVar string
Name string
......@@ -900,7 +900,7 @@ func TestSetupCredentials(t *testing.T) {
}
tests := map[string]testDef{
"no credentials": {
Name: "No Credentials",
Name: "No Credentials",
// don't execute VerifyFn
VerifyFn: nil,
},
......@@ -913,7 +913,7 @@ func TestSetupCredentials(t *testing.T) {
Password: "password",
},
},
Name: "Credentials from config",
Name: "Credentials from config",
VerifyFn: func(t *testing.T, test testDef, secret *api.Secret) {
assert.Equal(t, api.SecretTypeDockercfg, secret.Type)
assert.NotEmpty(t, secret.Data[api.DockerConfigKey])
......@@ -928,7 +928,7 @@ func TestSetupCredentials(t *testing.T) {
Password: "password",
},
},
Name: "Credentials of the wrong type from config",
Name: "Credentials of the wrong type from config",
// don't execute VerifyFn
VerifyFn: nil,
},
......@@ -966,7 +966,7 @@ func TestSetupCredentials(t *testing.T) {
executed := false
fakeClientRoundTripper := func(test testDef) func(req *http.Request) (*http.Response, error) {
return func(req *http.Request) (resp *http.Response, err error) {
secretBytes, err := ioutil.ReadAll(req.Body)
secretBytes, err := ioutil.ReadAll(req.Body)
executed = true
if err != nil {
......@@ -976,7 +976,7 @@ func TestSetupCredentials(t *testing.T) {
p := new(api.Secret)
err = json.Unmarshal(secretBytes, p)
err = json.Unmarshal(secretBytes, p)
if err != nil {
t.Errorf("error decoding pod: %s", err.Error())
......@@ -988,7 +988,7 @@ func TestSetupCredentials(t *testing.T) {
}
resp = &http.Response{StatusCode: http.StatusOK, Body: FakeReadCloser{
Reader: bytes.NewBuffer(secretBytes),
Reader: bytes.NewBuffer(secretBytes),
}}
resp.Header = make(http.Header)
resp.Header.Add("Content-Type", "application/json")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment