From b712751c6dc720113d071d824b921c4a12dc0e22 Mon Sep 17 00:00:00 2001 From: toshi0607 Date: Thu, 26 Sep 2019 20:50:36 +0900 Subject: [PATCH 1/2] gofmt --- node/pod_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/node/pod_test.go b/node/pod_test.go index 4994dc9c0..c1a5cc3ed 100644 --- a/node/pod_test.go +++ b/node/pod_test.go @@ -70,11 +70,11 @@ func TestPodsEqual(t *testing.T) { p1 := &corev1.Pod{ Spec: corev1.PodSpec{ Containers: []corev1.Container{ - corev1.Container{ + { Name: "nginx", Image: "nginx:1.15.12-perl", Ports: []corev1.ContainerPort{ - corev1.ContainerPort{ + { ContainerPort: 443, Protocol: "tcp", }, @@ -331,11 +331,11 @@ func TestFetchPodStatusFromProviderWithExpiredPod(t *testing.T) { func newPodSpec() corev1.PodSpec { return corev1.PodSpec{ Containers: []corev1.Container{ - corev1.Container{ + { Name: "nginx", Image: "nginx:1.15.12", Ports: []corev1.ContainerPort{ - corev1.ContainerPort{ + { ContainerPort: 443, Protocol: "tcp", }, From bcfc2accf8c040bd199b422ac49a25a50c988863 Mon Sep 17 00:00:00 2001 From: toshi0607 Date: Thu, 26 Sep 2019 20:52:06 +0900 Subject: [PATCH 2/2] misspell --- .../internal/commands/root/tracing_register.go | 2 +- node/env_internal_test.go | 4 ++-- node/pod_test.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/virtual-kubelet/internal/commands/root/tracing_register.go b/cmd/virtual-kubelet/internal/commands/root/tracing_register.go index b726cc993..a183126ac 100644 --- a/cmd/virtual-kubelet/internal/commands/root/tracing_register.go +++ b/cmd/virtual-kubelet/internal/commands/root/tracing_register.go @@ -29,7 +29,7 @@ var ( ) // TracingExporterInitFunc is the function that is called to initialize an exporter. -// This is used when registering an exporter and called when a user specifed they want to use the exporter. +// This is used when registering an exporter and called when a user specified they want to use the exporter. type TracingExporterInitFunc func(TracingExporterOptions) (trace.Exporter, error) // RegisterTracingExporter registers a tracing exporter. diff --git a/node/env_internal_test.go b/node/env_internal_test.go index cf9cf9a91..bf472383b 100644 --- a/node/env_internal_test.go +++ b/node/env_internal_test.go @@ -663,7 +663,7 @@ func TestEnvFromConfigMapAndSecretWithInvalidKeys(t *testing.T) { } // TestEnvOverridesEnvFrom populates the environment of a container from a configmap, and from another configmap's key with a "conflicting" key. -// Then, it checks that the value of the "conflicting" key has been correctly overriden. +// Then, it checks that the value of the "conflicting" key has been correctly overridden. func TestEnvOverridesEnvFrom(t *testing.T) { rm := testutil.FakeResourceManager(configMap3) er := testutil.FakeEventRecorder(defaultEventRecorderBufferSize) @@ -672,7 +672,7 @@ func TestEnvOverridesEnvFrom(t *testing.T) { override := "__override__" // Create a pod object having a single container. - // The container's environment is to be populated from a configmap, and later overriden with a value provided directly. + // The container's environment is to be populated from a configmap, and later overridden with a value provided directly. pod := &corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ Namespace: namespace, diff --git a/node/pod_test.go b/node/pod_test.go index c1a5cc3ed..0d7df7523 100644 --- a/node/pod_test.go +++ b/node/pod_test.go @@ -303,7 +303,7 @@ func TestFetchPodStatusFromProviderWithExpiredPod(t *testing.T) { pod.Status.Phase = corev1.PodRunning containerStatus := corev1.ContainerStatus{} - // We should terminate containters in a pod that has not provided pod status update for more than a minute + // We should terminate containers in a pod that has not provided pod status update for more than a minute startedAt := time.Now().Add(-(time.Minute + time.Second)) containerStatus.State.Running = &corev1.ContainerStateRunning{StartedAt: metav1.NewTime(startedAt)} pod.ObjectMeta.CreationTimestamp.Time = startedAt