mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 10:43:56 +00:00
e2e_node: mount_rro: fix error string comparison
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
parent
5cc1e56248
commit
ea14ccdf13
@ -123,13 +123,8 @@ var _ = SIGDescribe("Mount recursive read-only [LinuxOnly]", framework.WithSeria
|
||||
},
|
||||
},
|
||||
}
|
||||
pod = e2epod.NewPodClient(f).Create(ctx, pod)
|
||||
framework.ExpectNoError(e2epod.WaitForPodContainerToFail(ctx, f.ClientSet, pod.Namespace, pod.Name, 0, "CreateContainerConfigError", framework.PodStartShortTimeout))
|
||||
var err error
|
||||
pod, err = f.ClientSet.CoreV1().Pods(f.Namespace.Name).Get(ctx, pod.Name, metav1.GetOptions{})
|
||||
framework.ExpectNoError(err)
|
||||
gomega.Expect(pod.Status.ContainerStatuses[0].State.Waiting.Message).To(
|
||||
gomega.ContainSubstring("failed to resolve recursive read-only mode: volume \"mnt\" requested recursive read-only mode, but it is not read-only"))
|
||||
_, err := f.ClientSet.CoreV1().Pods(pod.Namespace).Create(ctx, pod, metav1.CreateOptions{})
|
||||
gomega.Expect(err).To(gomega.MatchError(gomega.ContainSubstring("spec.containers[0].volumeMounts.recursiveReadOnly: Forbidden: may only be specified when readOnly is true")))
|
||||
}) // By
|
||||
// See also the unit test [pkg/kubelet.TestResolveRecursiveReadOnly] for more invalid conditions (e.g., incompatible mount propagation)
|
||||
}) // It
|
||||
|
Loading…
Reference in New Issue
Block a user