mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Add [Feature:SELinux] to all tests that require SELinux
Most CI jobs run an OS that does not support SELinux, therefore tests that need it should be skipped by default. * [Feature:SELinux] marks tests that need SELinux (for any feature) * [Feature:SELinuxMountReadWriteOncePod] marks tests that need SELinuxMountReadWriteOncePod alpha gate enabled. Currently, all SELinux tests have both, but it will change in the future.
This commit is contained in:
parent
77b027936a
commit
ee12e3ff42
@ -2012,7 +2012,7 @@ var _ = utils.SIGDescribe("CSI mock volume", func() {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
ginkgo.Context("SELinuxMount [LinuxOnly][Feature:SELinuxMountReadWriteOncePod]", func() {
|
ginkgo.Context("SELinuxMount [LinuxOnly][Feature:SELinux][Feature:SELinuxMountReadWriteOncePod]", func() {
|
||||||
// Make sure all options are set so system specific defaults are not used.
|
// Make sure all options are set so system specific defaults are not used.
|
||||||
seLinuxOpts := v1.SELinuxOptions{
|
seLinuxOpts := v1.SELinuxOptions{
|
||||||
User: "system_u",
|
User: "system_u",
|
||||||
|
@ -202,26 +202,26 @@ func (s *disruptiveTestSuite) DefineTests(driver storageframework.TestDriver, pa
|
|||||||
}
|
}
|
||||||
multiplePodTests := []multiplePodTest{
|
multiplePodTests := []multiplePodTest{
|
||||||
{
|
{
|
||||||
testItStmt: "Should test that pv used in a pod that is deleted while the kubelet is down is usable by a new pod when kubelet returns [Feature:SELinuxMountReadWriteOncePod].",
|
testItStmt: "Should test that pv used in a pod that is deleted while the kubelet is down is usable by a new pod when kubelet returns [Feature:SELinux][Feature:SELinuxMountReadWriteOncePod].",
|
||||||
runTestFile: func(c clientset.Interface, f *framework.Framework, pod1, pod2 *v1.Pod) {
|
runTestFile: func(c clientset.Interface, f *framework.Framework, pod1, pod2 *v1.Pod) {
|
||||||
storageutils.TestVolumeUnmountsFromDeletedPodWithForceOption(c, f, pod1, false, false, pod2)
|
storageutils.TestVolumeUnmountsFromDeletedPodWithForceOption(c, f, pod1, false, false, pod2)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
testItStmt: "Should test that pv used in a pod that is force deleted while the kubelet is down is usable by a new pod when kubelet returns [Feature:SELinuxMountReadWriteOncePod].",
|
testItStmt: "Should test that pv used in a pod that is force deleted while the kubelet is down is usable by a new pod when kubelet returns [Feature:SELinux][Feature:SELinuxMountReadWriteOncePod].",
|
||||||
runTestFile: func(c clientset.Interface, f *framework.Framework, pod1, pod2 *v1.Pod) {
|
runTestFile: func(c clientset.Interface, f *framework.Framework, pod1, pod2 *v1.Pod) {
|
||||||
storageutils.TestVolumeUnmountsFromDeletedPodWithForceOption(c, f, pod1, true, false, pod2)
|
storageutils.TestVolumeUnmountsFromDeletedPodWithForceOption(c, f, pod1, true, false, pod2)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
testItStmt: "Should test that pv used in a pod that is deleted while the kubelet is down is usable by a new pod with a different SELinux context when kubelet returns [Feature:SELinuxMountReadWriteOncePod].",
|
testItStmt: "Should test that pv used in a pod that is deleted while the kubelet is down is usable by a new pod with a different SELinux context when kubelet returns [Feature:SELinux][Feature:SELinuxMountReadWriteOncePod].",
|
||||||
changeSELinuxContexts: true,
|
changeSELinuxContexts: true,
|
||||||
runTestFile: func(c clientset.Interface, f *framework.Framework, pod1, pod2 *v1.Pod) {
|
runTestFile: func(c clientset.Interface, f *framework.Framework, pod1, pod2 *v1.Pod) {
|
||||||
storageutils.TestVolumeUnmountsFromDeletedPodWithForceOption(c, f, pod1, false, false, pod2)
|
storageutils.TestVolumeUnmountsFromDeletedPodWithForceOption(c, f, pod1, false, false, pod2)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
testItStmt: "Should test that pv used in a pod that is force deleted while the kubelet is down is usable by a new pod with a different SELinux context when kubelet returns [Feature:SELinuxMountReadWriteOncePod].",
|
testItStmt: "Should test that pv used in a pod that is force deleted while the kubelet is down is usable by a new pod with a different SELinux context when kubelet returns [Feature:SELinux][Feature:SELinuxMountReadWriteOncePod].",
|
||||||
changeSELinuxContexts: true,
|
changeSELinuxContexts: true,
|
||||||
runTestFile: func(c clientset.Interface, f *framework.Framework, pod1, pod2 *v1.Pod) {
|
runTestFile: func(c clientset.Interface, f *framework.Framework, pod1, pod2 *v1.Pod) {
|
||||||
storageutils.TestVolumeUnmountsFromDeletedPodWithForceOption(c, f, pod1, true, false, pod2)
|
storageutils.TestVolumeUnmountsFromDeletedPodWithForceOption(c, f, pod1, true, false, pod2)
|
||||||
|
Loading…
Reference in New Issue
Block a user