mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 05:03:09 +00:00
Promote kubelet NodeConformance tests to Conformance
This commit is contained in:
parent
6b1af84d4a
commit
696c9ea0b1
5
test/conformance/testdata/conformance.txt
vendored
5
test/conformance/testdata/conformance.txt
vendored
@ -92,6 +92,11 @@ test/e2e/common/init_container.go: "should invoke init containers on a RestartNe
|
|||||||
test/e2e/common/init_container.go: "should invoke init containers on a RestartAlways pod"
|
test/e2e/common/init_container.go: "should invoke init containers on a RestartAlways pod"
|
||||||
test/e2e/common/init_container.go: "should not start app containers if init containers fail on a RestartAlways pod"
|
test/e2e/common/init_container.go: "should not start app containers if init containers fail on a RestartAlways pod"
|
||||||
test/e2e/common/init_container.go: "should not start app containers and fail the pod if init containers fail on a RestartNever pod"
|
test/e2e/common/init_container.go: "should not start app containers and fail the pod if init containers fail on a RestartNever pod"
|
||||||
|
test/e2e/common/kubelet.go: "should print the output to logs"
|
||||||
|
test/e2e/common/kubelet.go: "should have an terminated reason"
|
||||||
|
test/e2e/common/kubelet.go: "should be possible to delete"
|
||||||
|
test/e2e/common/kubelet.go: "should write entries to /etc/hosts"
|
||||||
|
test/e2e/common/kubelet.go: "should not write to root filesystem"
|
||||||
test/e2e/common/kubelet_etc_hosts.go: "should test kubelet managed /etc/hosts file"
|
test/e2e/common/kubelet_etc_hosts.go: "should test kubelet managed /etc/hosts file"
|
||||||
test/e2e/common/lifecycle_hook.go: "should execute poststart exec hook properly"
|
test/e2e/common/lifecycle_hook.go: "should execute poststart exec hook properly"
|
||||||
test/e2e/common/lifecycle_hook.go: "should execute prestop exec hook properly"
|
test/e2e/common/lifecycle_hook.go: "should execute prestop exec hook properly"
|
||||||
|
@ -41,11 +41,11 @@ var _ = framework.KubeDescribe("Kubelet", func() {
|
|||||||
podName := "busybox-scheduling-" + string(uuid.NewUUID())
|
podName := "busybox-scheduling-" + string(uuid.NewUUID())
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Release : v1.9
|
Release : v1.13
|
||||||
Testname: Kubelet, log output, default
|
Testname: Kubelet, log output, default
|
||||||
Description: By default the stdout and stderr from the process being executed in a pod MUST be sent to the pod's logs.
|
Description: By default the stdout and stderr from the process being executed in a pod MUST be sent to the pod's logs.
|
||||||
*/
|
*/
|
||||||
It("should print the output to logs [NodeConformance]", func() {
|
framework.ConformanceIt("should print the output to logs [NodeConformance]", func() {
|
||||||
podClient.CreateSync(&v1.Pod{
|
podClient.CreateSync(&v1.Pod{
|
||||||
ObjectMeta: metav1.ObjectMeta{
|
ObjectMeta: metav1.ObjectMeta{
|
||||||
Name: podName,
|
Name: podName,
|
||||||
@ -98,7 +98,12 @@ var _ = framework.KubeDescribe("Kubelet", func() {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
It("should have an terminated reason [NodeConformance]", func() {
|
/*
|
||||||
|
Release : v1.13
|
||||||
|
Testname: Kubelet, failed pod, terminated reason
|
||||||
|
Description: Create a Pod with terminated state. Pod MUST have only one container. Container MUST be in terminated state and MUST have an terminated reason.
|
||||||
|
*/
|
||||||
|
framework.ConformanceIt("should have an terminated reason [NodeConformance]", func() {
|
||||||
Eventually(func() error {
|
Eventually(func() error {
|
||||||
podData, err := podClient.Get(podName, metav1.GetOptions{})
|
podData, err := podClient.Get(podName, metav1.GetOptions{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -118,7 +123,12 @@ var _ = framework.KubeDescribe("Kubelet", func() {
|
|||||||
}, time.Minute, time.Second*4).Should(BeNil())
|
}, time.Minute, time.Second*4).Should(BeNil())
|
||||||
})
|
})
|
||||||
|
|
||||||
It("should be possible to delete [NodeConformance]", func() {
|
/*
|
||||||
|
Release : v1.13
|
||||||
|
Testname: Kubelet, failed pod, delete
|
||||||
|
Description: Create a Pod with terminated state. This terminated pod MUST be able to be deleted.
|
||||||
|
*/
|
||||||
|
framework.ConformanceIt("should be possible to delete [NodeConformance]", func() {
|
||||||
err := podClient.Delete(podName, &metav1.DeleteOptions{})
|
err := podClient.Delete(podName, &metav1.DeleteOptions{})
|
||||||
Expect(err).To(BeNil(), fmt.Sprintf("Error deleting Pod %v", err))
|
Expect(err).To(BeNil(), fmt.Sprintf("Error deleting Pod %v", err))
|
||||||
})
|
})
|
||||||
@ -126,7 +136,12 @@ var _ = framework.KubeDescribe("Kubelet", func() {
|
|||||||
Context("when scheduling a busybox Pod with hostAliases", func() {
|
Context("when scheduling a busybox Pod with hostAliases", func() {
|
||||||
podName := "busybox-host-aliases" + string(uuid.NewUUID())
|
podName := "busybox-host-aliases" + string(uuid.NewUUID())
|
||||||
|
|
||||||
It("should write entries to /etc/hosts [NodeConformance]", func() {
|
/*
|
||||||
|
Release : v1.13
|
||||||
|
Testname: Kubelet, hostAliases
|
||||||
|
Description: Create a Pod with hostAliases and a container with command to output /etc/hosts entries. Pod's logs MUST have matching entries of specified hostAliases to the output of /etc/hosts entries.
|
||||||
|
*/
|
||||||
|
framework.ConformanceIt("should write entries to /etc/hosts [NodeConformance]", func() {
|
||||||
podClient.CreateSync(&v1.Pod{
|
podClient.CreateSync(&v1.Pod{
|
||||||
ObjectMeta: metav1.ObjectMeta{
|
ObjectMeta: metav1.ObjectMeta{
|
||||||
Name: podName,
|
Name: podName,
|
||||||
@ -171,7 +186,12 @@ var _ = framework.KubeDescribe("Kubelet", func() {
|
|||||||
Context("when scheduling a read only busybox container", func() {
|
Context("when scheduling a read only busybox container", func() {
|
||||||
podName := "busybox-readonly-fs" + string(uuid.NewUUID())
|
podName := "busybox-readonly-fs" + string(uuid.NewUUID())
|
||||||
|
|
||||||
It("should not write to root filesystem [NodeConformance]", func() {
|
/*
|
||||||
|
Release : v1.13
|
||||||
|
Testname: Kubelet, pod with read only root file system
|
||||||
|
Description: Create a Pod with security context set with ReadOnlyRootFileSystem set to true. The Pod then tries to write to the /file on the root, write operation to the root filesystem MUST fail as expected.
|
||||||
|
*/
|
||||||
|
framework.ConformanceIt("should not write to root filesystem [NodeConformance]", func() {
|
||||||
isReadOnly := true
|
isReadOnly := true
|
||||||
podClient.CreateSync(&v1.Pod{
|
podClient.CreateSync(&v1.Pod{
|
||||||
ObjectMeta: metav1.ObjectMeta{
|
ObjectMeta: metav1.ObjectMeta{
|
||||||
|
Loading…
Reference in New Issue
Block a user