diff --git a/mocks/endpoints.go b/mocks/endpoints.go index 67ef315..7d1634a 100644 --- a/mocks/endpoints.go +++ b/mocks/endpoints.go @@ -19,9 +19,9 @@ func (e eClient) Get(name string) (*v1.Endpoints, error) { endpoint := &v1.Endpoints{ ObjectMeta: v1.ObjectMeta{Name: name}, Subsets: []v1.EndpointSubset{ - v1.EndpointSubset{ + { Addresses: []v1.EndpointAddress{ - v1.EndpointAddress{IP: "127.0.0.1"}, + {IP: "127.0.0.1"}, }, }, }, diff --git a/mocks/pod.go b/mocks/pod.go index 5695784..a597fdc 100644 --- a/mocks/pod.go +++ b/mocks/pod.go @@ -18,7 +18,7 @@ func (p pClient) Get(name string) (*v1.Pod, error) { ObjectMeta: v1.ObjectMeta{Name: name}, Status: v1.PodStatus{ ContainerStatuses: []v1.ContainerStatus{ - v1.ContainerStatus{ + { Name: "container_test", Ready: true, }, @@ -43,18 +43,18 @@ func (p pClient) DeleteCollection(options *v1.DeleteOptions, listOptions v1.List func (p pClient) List(options v1.ListOptions) (*v1.PodList, error) { return &v1.PodList{ Items: []v1.Pod{ - v1.Pod{ + { ObjectMeta: v1.ObjectMeta{Name: "podList"}, Status: v1.PodStatus{ HostIP: "127.0.01", Conditions: []v1.PodCondition{ - v1.PodCondition{ + { Type: v1.PodReady, Status: "True", }, }, ContainerStatuses: []v1.ContainerStatus{ - v1.ContainerStatus{ + { Name: "container_test", Ready: true, },