Merge pull request #94796 from harche/rtclass_test

Move the RuntimeClass tests out of node-kubelet-orphans
This commit is contained in:
Kubernetes Prow Robot 2020-10-20 13:44:20 -07:00 committed by GitHub
commit 6b7e8070b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,12 +39,12 @@ import (
var _ = ginkgo.Describe("[sig-node] RuntimeClass", func() { var _ = ginkgo.Describe("[sig-node] RuntimeClass", func() {
f := framework.NewDefaultFramework("runtimeclass") f := framework.NewDefaultFramework("runtimeclass")
ginkgo.It("should reject a Pod requesting a non-existent RuntimeClass", func() { ginkgo.It("should reject a Pod requesting a non-existent RuntimeClass [NodeFeature:RuntimeHandler]", func() {
rcName := f.Namespace.Name + "-nonexistent" rcName := f.Namespace.Name + "-nonexistent"
expectPodRejection(f, e2enode.NewRuntimeClassPod(rcName)) expectPodRejection(f, e2enode.NewRuntimeClassPod(rcName))
}) })
ginkgo.It("should reject a Pod requesting a RuntimeClass with an unconfigured handler", func() { ginkgo.It("should reject a Pod requesting a RuntimeClass with an unconfigured handler [NodeFeature:RuntimeHandler]", func() {
handler := f.Namespace.Name + "-handler" handler := f.Namespace.Name + "-handler"
rcName := createRuntimeClass(f, "unconfigured-handler", handler) rcName := createRuntimeClass(f, "unconfigured-handler", handler)
pod := f.PodClient().Create(e2enode.NewRuntimeClassPod(rcName)) pod := f.PodClient().Create(e2enode.NewRuntimeClassPod(rcName))
@ -61,7 +61,7 @@ var _ = ginkgo.Describe("[sig-node] RuntimeClass", func() {
expectPodSuccess(f, pod) expectPodSuccess(f, pod)
}) })
ginkgo.It("should reject a Pod requesting a deleted RuntimeClass", func() { ginkgo.It("should reject a Pod requesting a deleted RuntimeClass [NodeFeature:RuntimeHandler]", func() {
rcName := createRuntimeClass(f, "delete-me", "runc") rcName := createRuntimeClass(f, "delete-me", "runc")
rcClient := f.ClientSet.NodeV1beta1().RuntimeClasses() rcClient := f.ClientSet.NodeV1beta1().RuntimeClasses()