conformance tests should have at least 2 untainted nodes

This commit is contained in:
Antonio Ojea 2021-11-10 16:17:21 +01:00
parent 093e5e9cf7
commit 9723fbf3f1
5 changed files with 93 additions and 0 deletions

View File

@ -933,6 +933,13 @@
visible to subsequent reads.
release: v1.22
file: test/e2e/apps/statefulset.go
- testname: Conformance tests minimum number of nodes.
codename: '[sig-architecture] Conformance Tests should have at least two untainted
nodes [Conformance]'
description: Conformance tests requires at least two untainted nodes where pods
can be scheduled.
release: v1.23
file: test/e2e/architecture/conformance.go
- testname: CertificateSigningRequest API
codename: '[sig-auth] Certificates API [Privileged:ClusterAdmin] should support
CSR API operations [Conformance]'

View File

@ -0,0 +1,16 @@
# See the OWNERS docs at https://go.k8s.io/owners
# This is the owner of the test code. The test data itself is owned by sig-architecture.
reviewers:
- aojea
- cheftako
- oomichi
- johnbelamaric
approvers:
- cheftako
- spiffxp
- johnbelamaric
emeritus_approvers:
labels:
- area/conformance
- sig/architecture

View File

@ -0,0 +1,45 @@
/*
Copyright 2021 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package architecture
import (
"time"
"github.com/onsi/ginkgo"
"k8s.io/kubernetes/test/e2e/framework"
e2enode "k8s.io/kubernetes/test/e2e/framework/node"
)
var _ = SIGDescribe("Conformance Tests", func() {
f := framework.NewDefaultFramework("conformance-tests")
/*
Release: v1.23
Testname: Conformance tests minimum number of nodes.
Description: Conformance tests requires at least two untainted nodes where pods can be scheduled.
*/
framework.ConformanceIt("should have at least two untainted nodes", func() {
ginkgo.By("Getting node addresses")
framework.ExpectNoError(framework.WaitForAllNodesSchedulable(f.ClientSet, 10*time.Minute))
nodeList, err := e2enode.GetReadySchedulableNodes(f.ClientSet)
framework.ExpectNoError(err)
if len(nodeList.Items) < 2 {
framework.Failf("Conformance requires at least two nodes")
}
})
})

View File

@ -0,0 +1,24 @@
/*
Copyright 2021 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package architecture
import "github.com/onsi/ginkgo"
// SIGDescribe annotates the test with the SIG label.
func SIGDescribe(text string, body func()) bool {
return ginkgo.Describe("[sig-architecture] "+text, body)
}

View File

@ -44,6 +44,7 @@ import (
// test sources
_ "k8s.io/kubernetes/test/e2e/apimachinery"
_ "k8s.io/kubernetes/test/e2e/apps"
_ "k8s.io/kubernetes/test/e2e/architecture"
_ "k8s.io/kubernetes/test/e2e/auth"
_ "k8s.io/kubernetes/test/e2e/autoscaling"
_ "k8s.io/kubernetes/test/e2e/cloud"