Skip to content

Commit

Permalink
Merge pull request kubernetes#29802 from jfrazelle/fix-go-vet-errors
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue

fix go vet errors

<!--
Checklist for submitting a Pull Request

Please remove this comment block before submitting.

1. Please read our [contributor guidelines](https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md).
2. See our [developer guide](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md).
3. If you want this PR to automatically close an issue when it is merged,
   add `fixes #<issue number>` or `fixes #<issue number>, fixes #<issue number>`
   to close multiple issues (see: https://github.com/blog/1506-closing-issues-via-pull-requests).
4. Follow the instructions for [labeling and writing a release note for this PR](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes) in the block below.
-->

```release-note
```

This fixes the `go vet` errors brought about by go 1.7 testing re (kubernetes#28742).

The are all pretty trivial and mostly related to literal composites.

also related to kubernetes#16086
  • Loading branch information
Kubernetes Submit Queue authored Aug 15, 2016
2 parents da7e06e + 7e9d821 commit 69419a1
Show file tree
Hide file tree
Showing 27 changed files with 249 additions and 235 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func TestProcessServiceUpdate(t *testing.T) {
&cachedService{
lastState: &v1.Service{Status: v1.ServiceStatus{LoadBalancer: buildServiceStatus([][]string{{"ip1", ""}})}},
serviceStatusMap: map[string]v1.LoadBalancerStatus{
"foo1": {Ingress: []v1.LoadBalancerIngress{{"ip1", ""}}},
"foo1": {Ingress: []v1.LoadBalancerIngress{{IP: "ip1", Hostname: ""}}},
},
},
&v1.Service{Status: v1.ServiceStatus{LoadBalancer: buildServiceStatus([][]string{{"ip1", ""}})}},
Expand All @@ -77,7 +77,7 @@ func TestProcessServiceUpdate(t *testing.T) {
ObjectMeta: v1.ObjectMeta{Name: "bar1"},
},
serviceStatusMap: map[string]v1.LoadBalancerStatus{
"foo2": {Ingress: []v1.LoadBalancerIngress{{"ip1", ""}}},
"foo2": {Ingress: []v1.LoadBalancerIngress{{IP: "ip1", Hostname: ""}}},
},
},
&v1.Service{Status: v1.ServiceStatus{LoadBalancer: buildServiceStatus([][]string{{"ip1", ""}})}},
Expand Down Expand Up @@ -127,7 +127,7 @@ func TestProcessServiceDeletion(t *testing.T) {
&cachedService{
lastState: &v1.Service{Status: v1.ServiceStatus{LoadBalancer: buildServiceStatus([][]string{{"ip1", ""}})}},
serviceStatusMap: map[string]v1.LoadBalancerStatus{
"foo1": {Ingress: []v1.LoadBalancerIngress{{"ip1", ""}}},
"foo1": {Ingress: []v1.LoadBalancerIngress{{IP: "ip1", Hostname: ""}}},
},
},
&v1.Service{Status: v1.ServiceStatus{LoadBalancer: buildServiceStatus([][]string{{"ip1", ""}})}},
Expand Down
4 changes: 2 additions & 2 deletions hack/make-rules/vet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ for arg; do
done

if [[ ${#targets[@]} -eq 0 ]]; then
# Do not run on third_party directories.
targets=$(go list -e ./... | egrep -v "/(third_party|vendor|staging)/")
# Do not run on third_party directories or generated client code.
targets=$(go list -e ./... | egrep -v "/(third_party|vendor|staging|clientset_generated)/")
fi

go vet "${goflags[@]:+${goflags[@]}}" ${targets[@]}
8 changes: 4 additions & 4 deletions pkg/api/validation/validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2209,8 +2209,8 @@ func TestValidateHandler(t *testing.T) {
{HTTPGet: &api.HTTPGetAction{Path: "/", Port: intstr.FromInt(1), Host: "", Scheme: "HTTP"}},
{HTTPGet: &api.HTTPGetAction{Path: "/foo", Port: intstr.FromInt(65535), Host: "host", Scheme: "HTTP"}},
{HTTPGet: &api.HTTPGetAction{Path: "/", Port: intstr.FromString("port"), Host: "", Scheme: "HTTP"}},
{HTTPGet: &api.HTTPGetAction{Path: "/", Port: intstr.FromString("port"), Host: "", Scheme: "HTTP", HTTPHeaders: []api.HTTPHeader{{"Host", "foo.example.com"}}}},
{HTTPGet: &api.HTTPGetAction{Path: "/", Port: intstr.FromString("port"), Host: "", Scheme: "HTTP", HTTPHeaders: []api.HTTPHeader{{"X-Forwarded-For", "1.2.3.4"}, {"X-Forwarded-For", "5.6.7.8"}}}},
{HTTPGet: &api.HTTPGetAction{Path: "/", Port: intstr.FromString("port"), Host: "", Scheme: "HTTP", HTTPHeaders: []api.HTTPHeader{{Name: "Host", Value: "foo.example.com"}}}},
{HTTPGet: &api.HTTPGetAction{Path: "/", Port: intstr.FromString("port"), Host: "", Scheme: "HTTP", HTTPHeaders: []api.HTTPHeader{{Name: "X-Forwarded-For", Value: "1.2.3.4"}, {Name: "X-Forwarded-For", Value: "5.6.7.8"}}}},
}
for _, h := range successCases {
if errs := validateHandler(&h, field.NewPath("field")); len(errs) != 0 {
Expand All @@ -2224,8 +2224,8 @@ func TestValidateHandler(t *testing.T) {
{HTTPGet: &api.HTTPGetAction{Path: "", Port: intstr.FromInt(0), Host: ""}},
{HTTPGet: &api.HTTPGetAction{Path: "/foo", Port: intstr.FromInt(65536), Host: "host"}},
{HTTPGet: &api.HTTPGetAction{Path: "", Port: intstr.FromString(""), Host: ""}},
{HTTPGet: &api.HTTPGetAction{Path: "/", Port: intstr.FromString("port"), Host: "", Scheme: "HTTP", HTTPHeaders: []api.HTTPHeader{{"Host:", "foo.example.com"}}}},
{HTTPGet: &api.HTTPGetAction{Path: "/", Port: intstr.FromString("port"), Host: "", Scheme: "HTTP", HTTPHeaders: []api.HTTPHeader{{"X_Forwarded_For", "foo.example.com"}}}},
{HTTPGet: &api.HTTPGetAction{Path: "/", Port: intstr.FromString("port"), Host: "", Scheme: "HTTP", HTTPHeaders: []api.HTTPHeader{{Name: "Host:", Value: "foo.example.com"}}}},
{HTTPGet: &api.HTTPGetAction{Path: "/", Port: intstr.FromString("port"), Host: "", Scheme: "HTTP", HTTPHeaders: []api.HTTPHeader{{Name: "X_Forwarded_For", Value: "foo.example.com"}}}},
}
for _, h := range errorCases {
if errs := validateHandler(&h, field.NewPath("field")); len(errs) == 0 {
Expand Down
10 changes: 5 additions & 5 deletions pkg/client/cache/reflector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,14 +286,14 @@ func TestReflectorListAndWatchWithErrors(t *testing.T) {
{
list: mkList("1"),
events: []watch.Event{
{watch.Added, mkPod("foo", "2")},
{watch.Added, mkPod("bar", "3")},
{Type: watch.Added, Object: mkPod("foo", "2")},
{Type: watch.Added, Object: mkPod("bar", "3")},
},
}, {
list: mkList("3", mkPod("foo", "2"), mkPod("bar", "3")),
events: []watch.Event{
{watch.Deleted, mkPod("foo", "4")},
{watch.Added, mkPod("qux", "5")},
{Type: watch.Deleted, Object: mkPod("foo", "4")},
{Type: watch.Added, Object: mkPod("qux", "5")},
},
}, {
listErr: fmt.Errorf("a list error"),
Expand All @@ -303,7 +303,7 @@ func TestReflectorListAndWatchWithErrors(t *testing.T) {
}, {
list: mkList("5", mkPod("bar", "3"), mkPod("qux", "5")),
events: []watch.Event{
{watch.Added, mkPod("baz", "6")},
{Type: watch.Added, Object: mkPod("baz", "6")},
},
}, {
list: mkList("6", mkPod("bar", "3"), mkPod("qux", "5"), mkPod("baz", "6")),
Expand Down
12 changes: 6 additions & 6 deletions pkg/client/typed/discovery/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,17 +154,17 @@ func TestGetServerResources(t *testing.T) {
stable := unversioned.APIResourceList{
GroupVersion: "v1",
APIResources: []unversioned.APIResource{
{"pods", true, "Pod"},
{"services", true, "Service"},
{"namespaces", false, "Namespace"},
{Name: "pods", Namespaced: true, Kind: "Pod"},
{Name: "services", Namespaced: true, Kind: "Service"},
{Name: "namespaces", Namespaced: false, Kind: "Namespace"},
},
}
beta := unversioned.APIResourceList{
GroupVersion: "extensions/v1",
APIResources: []unversioned.APIResource{
{"deployments", true, "Deployment"},
{"ingresses", true, "Ingress"},
{"jobs", true, "Job"},
{Name: "deployments", Namespaced: true, Kind: "Deployment"},
{Name: "ingresses", Namespaced: true, Kind: "Ingress"},
{Name: "jobs", Namespaced: true, Kind: "Job"},
},
}
tests := []struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/podautoscaler/horizontal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ func (tc *testCase) prepareTestClient(t *testing.T) *fake.Clientset {
metrics := heapster.MetricResultList{}
for _, level := range tc.reportedLevels {
metric := heapster.MetricResult{
Metrics: []heapster.MetricPoint{{timestamp, level, nil}},
Metrics: []heapster.MetricPoint{{Timestamp: timestamp, Value: level, FloatValue: nil}},
LatestTimestamp: timestamp,
}
metrics.Items = append(metrics.Items, metric)
Expand Down
10 changes: 5 additions & 5 deletions pkg/controller/podautoscaler/metrics/metrics_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -442,9 +442,9 @@ func TestAggregateSum(t *testing.T) {
Items: []heapster.MetricResult{
{
Metrics: []heapster.MetricPoint{
{now, 50, nil},
{now.Add(-15 * time.Second), 100, nil},
{now.Add(-60 * time.Second), 100000, nil}},
{Timestamp: now, Value: 50, FloatValue: nil},
{Timestamp: now.Add(-15 * time.Second), Value: 100, FloatValue: nil},
{Timestamp: now.Add(-60 * time.Second), Value: 100000, FloatValue: nil}},
LatestTimestamp: now,
},
},
Expand All @@ -461,8 +461,8 @@ func TestAggregateSumSingle(t *testing.T) {
Items: []heapster.MetricResult{
{
Metrics: []heapster.MetricPoint{
{now, 50, nil},
{now.Add(-65 * time.Second), 100000, nil}},
{Timestamp: now, Value: 50, FloatValue: nil},
{Timestamp: now.Add(-65 * time.Second), Value: 100000, FloatValue: nil}},
LatestTimestamp: now,
},
},
Expand Down
7 changes: 5 additions & 2 deletions pkg/kubelet/container/runtime_cache_fake.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ func (r *TestRuntimeCache) GetCachedPods() []*Pod {
}

func NewTestRuntimeCache(getter podsGetter) *TestRuntimeCache {
c, _ := NewRuntimeCache(getter)
return &TestRuntimeCache{*c.(*runtimeCache)}
return &TestRuntimeCache{
runtimeCache: runtimeCache{
getter: getter,
},
}
}
6 changes: 3 additions & 3 deletions pkg/kubelet/dockertools/docker_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -610,9 +610,9 @@ func (dm *DockerManager) runContainer(
// Experimental. For now, we hardcode /dev/nvidia0 no matter what the user asks for
// (we only support one device per node).
devices = []dockercontainer.DeviceMapping{
{"/dev/nvidia0", "/dev/nvidia0", "mrw"},
{"/dev/nvidiactl", "/dev/nvidiactl", "mrw"},
{"/dev/nvidia-uvm", "/dev/nvidia-uvm", "mrw"},
{PathOnHost: "/dev/nvidia0", PathInContainer: "/dev/nvidia0", CgroupPermissions: "mrw"},
{PathOnHost: "/dev/nvidiactl", PathInContainer: "/dev/nvidiactl", CgroupPermissions: "mrw"},
{PathOnHost: "/dev/nvidia-uvm", PathInContainer: "/dev/nvidia-uvm", CgroupPermissions: "mrw"},
}
}
podHasSELinuxLabel := pod.Spec.SecurityContext != nil && pod.Spec.SecurityContext.SELinuxOptions != nil
Expand Down
16 changes: 12 additions & 4 deletions pkg/kubelet/dockertools/docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,25 +320,33 @@ func TestPullWithSecrets(t *testing.T) {
"default keyring secrets": {
"ubuntu",
[]api.Secret{},
credentialprovider.DockerConfig(map[string]credentialprovider.DockerConfigEntry{"index.docker.io/v1/": {"built-in", "password", "email", nil}}),
credentialprovider.DockerConfig(map[string]credentialprovider.DockerConfigEntry{
"index.docker.io/v1/": {Username: "built-in", Password: "password", Email: "email", Provider: nil},
}),
[]string{`ubuntu:latest using {"username":"built-in","password":"password","email":"email"}`},
},
"default keyring secrets unused": {
"ubuntu",
[]api.Secret{},
credentialprovider.DockerConfig(map[string]credentialprovider.DockerConfigEntry{"extraneous": {"built-in", "password", "email", nil}}),
credentialprovider.DockerConfig(map[string]credentialprovider.DockerConfigEntry{
"extraneous": {Username: "built-in", Password: "password", Email: "email", Provider: nil},
}),
[]string{`ubuntu:latest using {}`},
},
"builtin keyring secrets, but use passed": {
"ubuntu",
[]api.Secret{{Type: api.SecretTypeDockercfg, Data: map[string][]byte{api.DockerConfigKey: dockercfgContent}}},
credentialprovider.DockerConfig(map[string]credentialprovider.DockerConfigEntry{"index.docker.io/v1/": {"built-in", "password", "email", nil}}),
credentialprovider.DockerConfig(map[string]credentialprovider.DockerConfigEntry{
"index.docker.io/v1/": {Username: "built-in", Password: "password", Email: "email", Provider: nil},
}),
[]string{`ubuntu:latest using {"username":"passed-user","password":"passed-password","email":"passed-email"}`},
},
"builtin keyring secrets, but use passed with new docker config": {
"ubuntu",
[]api.Secret{{Type: api.SecretTypeDockerConfigJson, Data: map[string][]byte{api.DockerConfigJsonKey: dockerConfigJsonContent}}},
credentialprovider.DockerConfig(map[string]credentialprovider.DockerConfigEntry{"index.docker.io/v1/": {"built-in", "password", "email", nil}}),
credentialprovider.DockerConfig(map[string]credentialprovider.DockerConfigEntry{
"index.docker.io/v1/": {Username: "built-in", Password: "password", Email: "email", Provider: nil},
}),
[]string{`ubuntu:latest using {"username":"passed-user","password":"passed-password","email":"passed-email"}`},
},
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/kubelet/images/image_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func TestParallelPuller(t *testing.T) {
fakeRecorder := &record.FakeRecorder{}
puller := NewImageManager(fakeRecorder, fakeRuntime, backOff, false)

fakeRuntime.ImageList = []Image{{"present_image", nil, nil, 1}}
fakeRuntime.ImageList = []Image{{ID: "present_image", Size: 1}}
fakeRuntime.Err = c.pullerErr
fakeRuntime.InspectErr = c.inspectErr

Expand Down
40 changes: 20 additions & 20 deletions pkg/kubelet/kubelet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -945,32 +945,32 @@ func TestMakeVolumeMounts(t *testing.T) {

expectedMounts := []kubecontainer.Mount{
{
"disk",
"/etc/hosts",
"/mnt/disk",
false,
false,
Name: "disk",
ContainerPath: "/etc/hosts",
HostPath: "/mnt/disk",
ReadOnly: false,
SELinuxRelabel: false,
},
{
"disk",
"/mnt/path3",
"/mnt/disk",
true,
false,
Name: "disk",
ContainerPath: "/mnt/path3",
HostPath: "/mnt/disk",
ReadOnly: true,
SELinuxRelabel: false,
},
{
"disk4",
"/mnt/path4",
"/mnt/host",
false,
false,
Name: "disk4",
ContainerPath: "/mnt/path4",
HostPath: "/mnt/host",
ReadOnly: false,
SELinuxRelabel: false,
},
{
"disk5",
"/mnt/path5",
"/var/lib/kubelet/podID/volumes/empty/disk5",
false,
false,
Name: "disk5",
ContainerPath: "/mnt/path5",
HostPath: "/var/lib/kubelet/podID/volumes/empty/disk5",
ReadOnly: false,
SELinuxRelabel: false,
},
}
if !reflect.DeepEqual(mounts, expectedMounts) {
Expand Down
10 changes: 5 additions & 5 deletions pkg/kubelet/prober/prober_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,16 +175,16 @@ func TestHTTPHeaders(t *testing.T) {
}{
{[]api.HTTPHeader{}, http.Header{}},
{[]api.HTTPHeader{
{"X-Muffins-Or-Cupcakes", "Muffins"},
{Name: "X-Muffins-Or-Cupcakes", Value: "Muffins"},
}, http.Header{"X-Muffins-Or-Cupcakes": {"Muffins"}}},
{[]api.HTTPHeader{
{"X-Muffins-Or-Cupcakes", "Muffins"},
{"X-Muffins-Or-Plumcakes", "Muffins!"},
{Name: "X-Muffins-Or-Cupcakes", Value: "Muffins"},
{Name: "X-Muffins-Or-Plumcakes", Value: "Muffins!"},
}, http.Header{"X-Muffins-Or-Cupcakes": {"Muffins"},
"X-Muffins-Or-Plumcakes": {"Muffins!"}}},
{[]api.HTTPHeader{
{"X-Muffins-Or-Cupcakes", "Muffins"},
{"X-Muffins-Or-Cupcakes", "Cupcakes, too"},
{Name: "X-Muffins-Or-Cupcakes", Value: "Muffins"},
{Name: "X-Muffins-Or-Cupcakes", Value: "Cupcakes, too"},
}, http.Header{"X-Muffins-Or-Cupcakes": {"Muffins", "Cupcakes, too"}}},
}
for _, test := range testCases {
Expand Down
12 changes: 6 additions & 6 deletions pkg/kubelet/rkt/rkt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@ func baseApp(t *testing.T) *appctypes.App {
SupplementaryGIDs: []int{4, 5, 6},
WorkingDirectory: "/foo",
Environment: []appctypes.EnvironmentVariable{
{"env-foo", "bar"},
{Name: "env-foo", Value: "bar"},
},
MountPoints: []appctypes.MountPoint{
{Name: *appctypes.MustACName("mnt-foo"), Path: "/mnt-foo", ReadOnly: false},
Expand Down Expand Up @@ -997,7 +997,7 @@ func TestSetApp(t *testing.T) {
SupplementaryGIDs: []int{4, 5, 6},
WorkingDirectory: "/foo",
Environment: []appctypes.EnvironmentVariable{
{"env-foo", "bar"},
{Name: "env-foo", Value: "bar"},
},
MountPoints: []appctypes.MountPoint{
{Name: *appctypes.MustACName("mnt-foo"), Path: "/mnt-foo", ReadOnly: false},
Expand Down Expand Up @@ -1056,8 +1056,8 @@ func TestSetApp(t *testing.T) {
SupplementaryGIDs: []int{1, 2, 3, 4},
WorkingDirectory: tmpDir,
Environment: []appctypes.EnvironmentVariable{
{"env-foo", "bar"},
{"env-bar", "foo"},
{Name: "env-foo", Value: "bar"},
{Name: "env-bar", Value: "foo"},
},
MountPoints: []appctypes.MountPoint{
{Name: *appctypes.MustACName("mnt-foo"), Path: "/mnt-foo", ReadOnly: false},
Expand Down Expand Up @@ -1120,8 +1120,8 @@ func TestSetApp(t *testing.T) {
SupplementaryGIDs: []int{1, 2, 3, 4},
WorkingDirectory: tmpDir,
Environment: []appctypes.EnvironmentVariable{
{"env-foo", "foo"},
{"env-bar", "bar"},
{Name: "env-foo", Value: "foo"},
{Name: "env-bar", Value: "bar"},
},
MountPoints: []appctypes.MountPoint{
{Name: *appctypes.MustACName("mnt-foo"), Path: "/mnt-bar", ReadOnly: true},
Expand Down
6 changes: 3 additions & 3 deletions pkg/master/master_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,9 @@ func TestFindExternalAddress(t *testing.T) {
expectedIP := "172.0.0.1"

nodes := []*api.Node{new(api.Node), new(api.Node), new(api.Node)}
nodes[0].Status.Addresses = []api.NodeAddress{{"ExternalIP", expectedIP}}
nodes[1].Status.Addresses = []api.NodeAddress{{"LegacyHostIP", expectedIP}}
nodes[2].Status.Addresses = []api.NodeAddress{{"ExternalIP", expectedIP}, {"LegacyHostIP", "172.0.0.2"}}
nodes[0].Status.Addresses = []api.NodeAddress{{Type: "ExternalIP", Address: expectedIP}}
nodes[1].Status.Addresses = []api.NodeAddress{{Type: "LegacyHostIP", Address: expectedIP}}
nodes[2].Status.Addresses = []api.NodeAddress{{Type: "ExternalIP", Address: expectedIP}, {Type: "LegacyHostIP", Address: "172.0.0.2"}}

// Pass Case
for _, node := range nodes {
Expand Down
8 changes: 3 additions & 5 deletions pkg/util/flowcontrol/throttle.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,9 @@ type fakeNeverRateLimiter struct {
}

func NewFakeNeverRateLimiter() RateLimiter {
wg := sync.WaitGroup{}
wg.Add(1)
return &fakeNeverRateLimiter{
wg: wg,
}
rl := fakeNeverRateLimiter{}
rl.wg.Add(1)
return &rl
}

func (t *fakeNeverRateLimiter) TryAccept() bool {
Expand Down
4 changes: 2 additions & 2 deletions pkg/util/proxy/dial.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ func DialURL(url *url.URL, transport http.RoundTripper) (net.Conn, error) {
inferredHost = host
}
// Make a copy to avoid polluting the provided config
tlsConfigCopy := *tlsConfig
tlsConfigCopy, _ := utilnet.TLSClientConfig(transport)
tlsConfigCopy.ServerName = inferredHost
tlsConfig = &tlsConfigCopy
tlsConfig = tlsConfigCopy
}
tlsConn = tls.Client(netConn, tlsConfig)
if err := tlsConn.Handshake(); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/volume/glusterfs/glusterfs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) {
},
Subsets: []api.EndpointSubset{{
Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}},
Ports: []api.EndpointPort{{"foo", 80, api.ProtocolTCP}},
Ports: []api.EndpointPort{{Name: "foo", Port: 80, Protocol: api.ProtocolTCP}},
}},
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/volume/iscsi/iscsi_util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func fakeFilepathGlob(devicePath string) (globs []string, err error) {
return []string{devicePath}, nil
}

func TestextractTransportname(t *testing.T) {
func TestExtractTransportname(t *testing.T) {
fakeIscsiadmOutput := []string{
"# BEGIN RECORD 2.0-873\n" +
"iface.iscsi_ifacename = default\n" +
Expand Down
Loading

0 comments on commit 69419a1

Please sign in to comment.