diff --git a/test/e2e/generated/BUILD b/test/e2e/generated/BUILD index a82f3efa2c1..895dd683fbd 100644 --- a/test/e2e/generated/BUILD +++ b/test/e2e/generated/BUILD @@ -13,28 +13,8 @@ load( go_library( name = "go_default_library", srcs = [ + "bindata.go", "main.go", - ":bindata", - ], -) - -genrule( - name = "bindata", - srcs = [ - "//examples:sources", - "//test/images:sources", - "//test/fixtures:sources", - "//test/e2e/testing-manifests:sources", - ], - outs = ["bindata.go"], - cmd = """ -$(location //vendor:github.com/jteeuwen/go-bindata/go-bindata) \ - -nometadata -o "$(OUTS)" -pkg generated \ - -prefix $$(pwd) \ - -ignore .jpg -ignore .png -ignore .md \ - $(SRCS) -""", - tools = [ - "//vendor:github.com/jteeuwen/go-bindata/go-bindata", ], + tags = ["automanaged"], ) diff --git a/test/e2e_node/BUILD b/test/e2e_node/BUILD index 58283738ab1..8ed218398b7 100644 --- a/test/e2e_node/BUILD +++ b/test/e2e_node/BUILD @@ -60,6 +60,7 @@ go_test( "image_id_test.go", "kubelet_test.go", "lifecycle_hook_test.go", + "log_path_test.go", "memory_eviction_test.go", "mirror_pod_test.go", "resource_usage_test.go", @@ -76,8 +77,10 @@ go_test( "//pkg/api/unversioned:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", + "//pkg/kubelet:go_default_library", "//pkg/kubelet/api/v1alpha1/stats:go_default_library", "//pkg/kubelet/cm:go_default_library", + "//pkg/kubelet/container:go_default_library", "//pkg/kubelet/dockertools:go_default_library", "//pkg/kubelet/images:go_default_library", "//pkg/kubelet/metrics:go_default_library", diff --git a/test/e2e_node/log_path_test.go b/test/e2e_node/log_path_test.go index b14bbd7eb7c..bf2b5be1740 100644 --- a/test/e2e_node/log_path_test.go +++ b/test/e2e_node/log_path_test.go @@ -36,10 +36,7 @@ var _ = framework.KubeDescribe("ContainerLogPath", func() { podClient := f.PodClient() ns := f.Namespace.Name - rootfsDirVolumeName := "docker-dir-vol" - - rootfsDir := "/root" - rootDir := "/" + logDirVolumeName := "log-dir-vol" logDir := kubelet.ContainerLogsDir logPodName := "logger-" + string(uuid.NewUUID()) @@ -65,7 +62,7 @@ var _ = framework.KubeDescribe("ContainerLogPath", func() { } podClient.Create(logPod) - err := framework.WaitForPodSuccessInNamespace(f.Client, logPodName, ns) + err := framework.WaitForPodSuccessInNamespace(f.ClientSet, logPodName, ns) framework.ExpectNoError(err, "Failed waiting for pod: %s to enter success state", logPodName) // get containerID from created Pod @@ -86,13 +83,14 @@ var _ = framework.KubeDescribe("ContainerLogPath", func() { { Image: "gcr.io/google_containers/busybox:1.24", Name: checkContName, - // if we find expected log file and contains right content, exit 0 + // If we find expected log file and contains right content, exit 0 // else, keep checking until test timeout - Command: []string{"sh", "-c", "chroot " + rootfsDir + " while true; do if [ -e " + expectedlogFile + " ] && grep -q " + logString + " " + expectedlogFile + "; then exit 0; fi; sleep 1; done"}, + Command: []string{"sh", "-c", "while true; do if [ -e " + expectedlogFile + " ] && grep -q " + logString + " " + expectedlogFile + "; then exit 0; fi; sleep 1; done"}, VolumeMounts: []api.VolumeMount{ { - Name: rootfsDirVolumeName, - MountPath: rootfsDir, + Name: logDirVolumeName, + // mount ContainerLogsDir to the same path in container + MountPath: expectedlogFile, ReadOnly: true, }, }, @@ -100,10 +98,10 @@ var _ = framework.KubeDescribe("ContainerLogPath", func() { }, Volumes: []api.Volume{ { - Name: rootfsDirVolumeName, + Name: logDirVolumeName, VolumeSource: api.VolumeSource{ HostPath: &api.HostPathVolumeSource{ - Path: rootDir, + Path: expectedlogFile, }, }, }, @@ -112,7 +110,7 @@ var _ = framework.KubeDescribe("ContainerLogPath", func() { } podClient.Create(checkPod) - err = framework.WaitForPodSuccessInNamespace(f.Client, checkPodName, ns) + err = framework.WaitForPodSuccessInNamespace(f.ClientSet, checkPodName, ns) framework.ExpectNoError(err, "Failed waiting for pod: %s to enter success state", checkPodName) }) }) diff --git a/test/test_owners.csv b/test/test_owners.csv index be056d9e983..0ab68e5058c 100644 --- a/test/test_owners.csv +++ b/test/test_owners.csv @@ -40,6 +40,7 @@ Container Runtime Conformance Test container runtime conformance blackbox test w Container Runtime Conformance Test container runtime conformance blackbox test when starting a container that exits should report termination message if TerminationMessagePath is set,timothysc,1 DNS horizontal autoscaling kube-dns-autoscaler should scale kube-dns pods in both nonfaulty and faulty scenarios,MrHohn,0 DNS horizontal autoscaling kube-dns-autoscaler should scale kube-dns pods when cluster size changed,MrHohn,0 +ContainerLogPath Pod with a container printed log to stdout should print log to correct log path,resouer,0 DNS should provide DNS for ExternalName services,rmmh,1 DNS should provide DNS for pods for Hostname and Subdomain Annotation,mtaufen,1 DNS should provide DNS for services,roberthbailey,1