...
1
16
17 package architecture
18
19 import (
20 "context"
21 "time"
22
23 "github.com/onsi/ginkgo/v2"
24
25 "k8s.io/kubernetes/test/e2e/framework"
26 e2enode "k8s.io/kubernetes/test/e2e/framework/node"
27 admissionapi "k8s.io/pod-security-admission/api"
28 )
29
30 var _ = SIGDescribe("Conformance Tests", func() {
31 f := framework.NewDefaultFramework("conformance-tests")
32 f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
33
34
39 framework.ConformanceIt("should have at least two untainted nodes", func(ctx context.Context) {
40 ginkgo.By("Getting node addresses")
41 framework.ExpectNoError(e2enode.WaitForAllNodesSchedulable(ctx, f.ClientSet, 10*time.Minute))
42 nodeList, err := e2enode.GetReadySchedulableNodes(ctx, f.ClientSet)
43 framework.ExpectNoError(err)
44 if len(nodeList.Items) < 2 {
45 framework.Failf("Conformance requires at least two nodes")
46 }
47 })
48 })
49
View as plain text