Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: Enable some [LinuxOnly] tests for Windows Containerd #97045

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
81 changes: 42 additions & 39 deletions test/conformance/testdata/conformance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1585,47 +1585,47 @@
that the pre-stop is executed.
release: v1.9
file: test/e2e/common/node/lifecycle_hook.go
- testname: Container Runtime, TerminationMessagePath, non-root user and non-default
path
codename: '[sig-node] Container Runtime blackbox test on terminated container should
report termination message [LinuxOnly] if TerminationMessagePath is set as non-root
user and at a non-default path [NodeConformance] [Conformance]'
description: 'Create a pod with a container to run it as a non-root user with a
custom TerminationMessagePath set. Pod redirects the output to the provided path
successfully. When the container is terminated, the termination message MUST match
the expected output logged in the provided custom path. [LinuxOnly]: Tagged LinuxOnly
due to use of ''uid'' and unable to mount files in Windows Containers.'
release: v1.15
file: test/e2e/common/node/runtime.go
- testname: Container Runtime, TerminationMessage, from log output of succeeding container
codename: '[sig-node] Container Runtime blackbox test on terminated container should
report termination message [LinuxOnly] as empty when pod succeeds and TerminationMessagePolicy
FallbackToLogsOnError is set [NodeConformance] [Conformance]'
report termination message as empty when pod succeeds and TerminationMessagePolicy
FallbackToLogsOnError is set [Excluded:WindowsDocker] [NodeConformance] [Conformance]'
description: 'Create a pod with an container. Container''s output is recorded in
log and container exits successfully without an error. When container is terminated,
terminationMessage MUST have no content as container succeed. [LinuxOnly]: Cannot
mount files in Windows Containers.'
terminationMessage MUST have no content as container succeed. [Excluded:WindowsDocker]:
Cannot mount files in Windows Containers created by Docker.'
release: v1.15
file: test/e2e/common/node/runtime.go
- testname: Container Runtime, TerminationMessage, from file of succeeding container
codename: '[sig-node] Container Runtime blackbox test on terminated container should
report termination message [LinuxOnly] from file when pod succeeds and TerminationMessagePolicy
FallbackToLogsOnError is set [NodeConformance] [Conformance]'
report termination message from file when pod succeeds and TerminationMessagePolicy
FallbackToLogsOnError is set [Excluded:WindowsDocker] [NodeConformance] [Conformance]'
description: 'Create a pod with an container. Container''s output is recorded in
a file and the container exits successfully without an error. When container is
terminated, terminationMessage MUST match with the content from file. [LinuxOnly]:
Cannot mount files in Windows Containers.'
terminated, terminationMessage MUST match with the content from file. [Excluded:WindowsDocker]:
Cannot mount files in Windows Containers created by Docker.'
release: v1.15
file: test/e2e/common/node/runtime.go
- testname: Container Runtime, TerminationMessage, from container's log output of
failing container
codename: '[sig-node] Container Runtime blackbox test on terminated container should
report termination message [LinuxOnly] from log output if TerminationMessagePolicy
FallbackToLogsOnError is set [NodeConformance] [Conformance]'
report termination message from log output if TerminationMessagePolicy FallbackToLogsOnError
is set [Excluded:WindowsDocker] [NodeConformance] [Conformance]'
description: 'Create a pod with an container. Container''s output is recorded in
log and container exits with an error. When container is terminated, termination
message MUST match the expected output recorded from container''s log. [LinuxOnly]:
Cannot mount files in Windows Containers.'
release: v1.15
file: test/e2e/common/node/runtime.go
- testname: Container Runtime, TerminationMessagePath, non-root user and non-default
path
codename: '[sig-node] Container Runtime blackbox test on terminated container should
report termination message [LinuxOnly] if TerminationMessagePath is set as non-root
user and at a non-default path [NodeConformance] [Conformance]'
description: 'Create a pod with a container to run it as a non-root user with a
custom TerminationMessagePath set. Pod redirects the output to the provided path
successfully. When the container is terminated, the termination message MUST match
the expected output logged in the provided custom path. [LinuxOnly]: Tagged LinuxOnly
due to use of ''uid'' and unable to mount files in Windows Containers.'
message MUST match the expected output recorded from container''s log. [Excluded:WindowsDocker]:
Cannot mount files in Windows Containers created by Docker.'
release: v1.15
file: test/e2e/common/node/runtime.go
- testname: Container Runtime, Restart Policy, Pod Phases
Expand Down Expand Up @@ -2953,43 +2953,46 @@
file: test/e2e/common/storage/secrets_volume.go
- testname: 'SubPath: Reading content from a configmap volume.'
codename: '[sig-storage] Subpath Atomic writer volumes should support subpaths with
configmap pod [LinuxOnly] [Conformance]'
configmap pod [Excluded:WindowsDocker] [Conformance]'
description: Containers in a pod can read content from a configmap mounted volume
which was configured with a subpath. This test is marked LinuxOnly since Windows
cannot mount individual files in Containers.
which was configured with a subpath. This test is marked [Excluded:WindowsDocker]
since Docker does not support creating individual file mounts for containers on
Windows.
release: v1.12
file: test/e2e/storage/subpath.go
- testname: 'SubPath: Reading content from a configmap volume.'
codename: '[sig-storage] Subpath Atomic writer volumes should support subpaths with
configmap pod with mountPath of existing file [LinuxOnly] [Conformance]'
configmap pod with mountPath of existing file [Excluded:WindowsDocker] [Conformance]'
description: Containers in a pod can read content from a configmap mounted volume
which was configured with a subpath and also using a mountpath that is a specific
file. This test is marked LinuxOnly since Windows cannot mount individual files
in Containers.
file. This test is marked [Excluded:WindowsDocker] since Docker does not support
creating individual file mounts for containers on Windows.
release: v1.12
file: test/e2e/storage/subpath.go
- testname: 'SubPath: Reading content from a downwardAPI volume.'
codename: '[sig-storage] Subpath Atomic writer volumes should support subpaths with
downward pod [LinuxOnly] [Conformance]'
downward pod [Excluded:WindowsDocker] [Conformance]'
description: Containers in a pod can read content from a downwardAPI mounted volume
which was configured with a subpath. This test is marked LinuxOnly since Windows
cannot mount individual files in Containers.
which was configured with a subpath. This test is marked [Excluded:WindowsDocker]
since Docker does not support creating individual file mounts for containers on
Windows.
release: v1.12
file: test/e2e/storage/subpath.go
- testname: 'SubPath: Reading content from a projected volume.'
codename: '[sig-storage] Subpath Atomic writer volumes should support subpaths with
projected pod [LinuxOnly] [Conformance]'
projected pod [Excluded:WindowsDocker] [Conformance]'
description: Containers in a pod can read content from a projected mounted volume
which was configured with a subpath. This test is marked LinuxOnly since Windows
cannot mount individual files in Containers.
which was configured with a subpath. This test is marked [Excluded:WindowsDocker]
since Docker does not support creating individual file mounts for containers on
Windows.
release: v1.12
file: test/e2e/storage/subpath.go
- testname: 'SubPath: Reading content from a secret volume.'
codename: '[sig-storage] Subpath Atomic writer volumes should support subpaths with
secret pod [LinuxOnly] [Conformance]'
secret pod [Excluded:WindowsDocker] [Conformance]'
description: Containers in a pod can read content from a secret mounted volume which
was configured with a subpath. This test is marked LinuxOnly since Windows cannot
mount individual files in Containers.
was configured with a subpath. This test is marked [Excluded:WindowsDocker] since
Docker does not support creating individual file mounts for containers on Windows.
release: v1.12
file: test/e2e/storage/subpath.go

18 changes: 9 additions & 9 deletions test/e2e/common/node/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ while true; do sleep 1; done
gomega.Expect(c.Delete()).To(gomega.Succeed())
}

ginkgo.It("should report termination message [LinuxOnly] if TerminationMessagePath is set [NodeConformance]", func() {
// Cannot mount files in Windows Containers.
// TODO(claudiub): Remove [LinuxOnly] tag once Containerd becomes the default
ginkgo.It("should report termination message if TerminationMessagePath is set [Excluded:WindowsDocker] [NodeConformance]", func() {
// Cannot mount files in Windows Containers created by Docker.
// TODO(claudiub): Remove [Excluded:WindowsDocker] tag if Containerd becomes the only
// container runtime on Windows.
container := v1.Container{
Image: framework.BusyBoxImage,
Expand Down Expand Up @@ -215,9 +215,9 @@ while true; do sleep 1; done
Release: v1.15
Testname: Container Runtime, TerminationMessage, from container's log output of failing container
Description: Create a pod with an container. Container's output is recorded in log and container exits with an error. When container is terminated, termination message MUST match the expected output recorded from container's log.
[LinuxOnly]: Cannot mount files in Windows Containers.
[Excluded:WindowsDocker]: Cannot mount files in Windows Containers created by Docker.
*/
framework.ConformanceIt("should report termination message [LinuxOnly] from log output if TerminationMessagePolicy FallbackToLogsOnError is set [NodeConformance]", func() {
framework.ConformanceIt("should report termination message from log output if TerminationMessagePolicy FallbackToLogsOnError is set [Excluded:WindowsDocker] [NodeConformance]", func() {
container := v1.Container{
Image: framework.BusyBoxImage,
Command: []string{"/bin/sh", "-c"},
Expand All @@ -232,9 +232,9 @@ while true; do sleep 1; done
Release: v1.15
Testname: Container Runtime, TerminationMessage, from log output of succeeding container
Description: Create a pod with an container. Container's output is recorded in log and container exits successfully without an error. When container is terminated, terminationMessage MUST have no content as container succeed.
[LinuxOnly]: Cannot mount files in Windows Containers.
[Excluded:WindowsDocker]: Cannot mount files in Windows Containers created by Docker.
*/
framework.ConformanceIt("should report termination message [LinuxOnly] as empty when pod succeeds and TerminationMessagePolicy FallbackToLogsOnError is set [NodeConformance]", func() {
framework.ConformanceIt("should report termination message as empty when pod succeeds and TerminationMessagePolicy FallbackToLogsOnError is set [Excluded:WindowsDocker] [NodeConformance]", func() {
container := v1.Container{
Image: framework.BusyBoxImage,
Command: []string{"/bin/sh", "-c"},
Expand All @@ -249,9 +249,9 @@ while true; do sleep 1; done
Release: v1.15
Testname: Container Runtime, TerminationMessage, from file of succeeding container
Description: Create a pod with an container. Container's output is recorded in a file and the container exits successfully without an error. When container is terminated, terminationMessage MUST match with the content from file.
[LinuxOnly]: Cannot mount files in Windows Containers.
[Excluded:WindowsDocker]: Cannot mount files in Windows Containers created by Docker.
*/
framework.ConformanceIt("should report termination message [LinuxOnly] from file when pod succeeds and TerminationMessagePolicy FallbackToLogsOnError is set [NodeConformance]", func() {
framework.ConformanceIt("should report termination message from file when pod succeeds and TerminationMessagePolicy FallbackToLogsOnError is set [Excluded:WindowsDocker] [NodeConformance]", func() {
container := v1.Container{
Image: framework.BusyBoxImage,
Command: []string{"/bin/sh", "-c"},
Expand Down
30 changes: 15 additions & 15 deletions test/e2e/storage/subpath.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ var _ = utils.SIGDescribe("Subpath", func() {
Release: v1.12
Testname: SubPath: Reading content from a secret volume.
Description: Containers in a pod can read content from a secret mounted volume which was configured with a subpath.
This test is marked LinuxOnly since Windows cannot mount individual files in Containers.
This test is marked [Excluded:WindowsDocker] since Docker does not support creating individual file mounts for containers on Windows.
*/
framework.ConformanceIt("should support subpaths with secret pod [LinuxOnly]", func() {
// TODO(claudiub): Remove [LinuxOnly] tag once Containerd becomes the default container runtime on Windows.
framework.ConformanceIt("should support subpaths with secret pod [Excluded:WindowsDocker]", func() {
// TODO(claudiub): Remove [Excluded:WindowsDocker] tag if Containerd becomes the default container runtime on Windows.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think TODO is needed here and below. The new name is self-explanatory

pod := testsuites.SubpathTestPod(f, "secret-key", "secret", &v1.VolumeSource{Secret: &v1.SecretVolumeSource{SecretName: "my-secret"}}, privilegedSecurityContext)
testsuites.TestBasicSubpath(f, "secret-value", pod)
})
Expand All @@ -66,10 +66,10 @@ var _ = utils.SIGDescribe("Subpath", func() {
Release: v1.12
Testname: SubPath: Reading content from a configmap volume.
Description: Containers in a pod can read content from a configmap mounted volume which was configured with a subpath.
This test is marked LinuxOnly since Windows cannot mount individual files in Containers.
This test is marked [Excluded:WindowsDocker] since Docker does not support creating individual file mounts for containers on Windows.
*/
framework.ConformanceIt("should support subpaths with configmap pod [LinuxOnly]", func() {
// TODO(claudiub): Remove [LinuxOnly] tag once Containerd becomes the default container runtime on Windows.
framework.ConformanceIt("should support subpaths with configmap pod [Excluded:WindowsDocker]", func() {
// TODO(claudiub): Remove [Excluded:WindowsDocker] tag if Containerd becomes the only container runtime on Windows.
pod := testsuites.SubpathTestPod(f, "configmap-key", "configmap", &v1.VolumeSource{ConfigMap: &v1.ConfigMapVolumeSource{LocalObjectReference: v1.LocalObjectReference{Name: "my-configmap"}}}, privilegedSecurityContext)
testsuites.TestBasicSubpath(f, "configmap-value", pod)
})
Expand All @@ -78,10 +78,10 @@ var _ = utils.SIGDescribe("Subpath", func() {
Release: v1.12
Testname: SubPath: Reading content from a configmap volume.
Description: Containers in a pod can read content from a configmap mounted volume which was configured with a subpath and also using a mountpath that is a specific file.
This test is marked LinuxOnly since Windows cannot mount individual files in Containers.
This test is marked [Excluded:WindowsDocker] since Docker does not support creating individual file mounts for containers on Windows.
*/
framework.ConformanceIt("should support subpaths with configmap pod with mountPath of existing file [LinuxOnly]", func() {
// TODO(claudiub): Remove [LinuxOnly] tag once Containerd becomes the default container runtime on Windows.
framework.ConformanceIt("should support subpaths with configmap pod with mountPath of existing file [Excluded:WindowsDocker]", func() {
// TODO(claudiub): Remove [Excluded:WindowsDocker] tag if Containerd becomes the default container runtime on Windows.
pod := testsuites.SubpathTestPod(f, "configmap-key", "configmap", &v1.VolumeSource{ConfigMap: &v1.ConfigMapVolumeSource{LocalObjectReference: v1.LocalObjectReference{Name: "my-configmap"}}}, privilegedSecurityContext)
file := "/etc/resolv.conf"
pod.Spec.Containers[0].VolumeMounts[0].MountPath = file
Expand All @@ -92,10 +92,10 @@ var _ = utils.SIGDescribe("Subpath", func() {
Release: v1.12
Testname: SubPath: Reading content from a downwardAPI volume.
Description: Containers in a pod can read content from a downwardAPI mounted volume which was configured with a subpath.
This test is marked LinuxOnly since Windows cannot mount individual files in Containers.
This test is marked [Excluded:WindowsDocker] since Docker does not support creating individual file mounts for containers on Windows.
*/
framework.ConformanceIt("should support subpaths with downward pod [LinuxOnly]", func() {
// TODO(claudiub): Remove [LinuxOnly] tag once Containerd becomes the default container runtime on Windows.
framework.ConformanceIt("should support subpaths with downward pod [Excluded:WindowsDocker]", func() {
// TODO(claudiub): Remove [Excluded:WindowsDocker] tag if Containerd becomes the default container runtime on Windows.
pod := testsuites.SubpathTestPod(f, "downward/podname", "downwardAPI", &v1.VolumeSource{
DownwardAPI: &v1.DownwardAPIVolumeSource{
Items: []v1.DownwardAPIVolumeFile{{Path: "downward/podname", FieldRef: &v1.ObjectFieldSelector{APIVersion: "v1", FieldPath: "metadata.name"}}},
Expand All @@ -108,10 +108,10 @@ var _ = utils.SIGDescribe("Subpath", func() {
Release: v1.12
Testname: SubPath: Reading content from a projected volume.
Description: Containers in a pod can read content from a projected mounted volume which was configured with a subpath.
This test is marked LinuxOnly since Windows cannot mount individual files in Containers.
This test is marked [Excluded:WindowsDocker] since Docker does not support creating individual file mounts for containers on Windows.
*/
framework.ConformanceIt("should support subpaths with projected pod [LinuxOnly]", func() {
// TODO(claudiub): Remove [LinuxOnly] tag once Containerd becomes the default container runtime on Windows.
framework.ConformanceIt("should support subpaths with projected pod [Excluded:WindowsDocker]", func() {
// TODO(claudiub): Remove [Excluded:WindowsDocker] tag once Containerd becomes the default container runtime on Windows.
pod := testsuites.SubpathTestPod(f, "projected/configmap-key", "projected", &v1.VolumeSource{
Projected: &v1.ProjectedVolumeSource{
Sources: []v1.VolumeProjection{
Expand Down