mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
e2e framework: support Ginkgo decorators for framework.ConformanceIt
Additional parameters like ginkgo.SpecTimeout may also be relevant for conformance tests.
This commit is contained in:
parent
a864583905
commit
a51999e951
@ -529,11 +529,6 @@ func (kc *KubeConfig) FindCluster(name string) *KubeCluster {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ConformanceIt is wrapper function for ginkgo It. Adds "[Conformance]" tag and makes static analysis easier.
|
||||
func ConformanceIt(text string, body interface{}) bool {
|
||||
return ginkgo.It(text+" [Conformance]", ginkgo.Offset(1), body)
|
||||
}
|
||||
|
||||
// PodStateVerification represents a verification of pod state.
|
||||
// Any time you have a set of pods that you want to operate against or query,
|
||||
// this struct can be used to declaratively identify those pods.
|
||||
|
@ -20,6 +20,7 @@ import (
|
||||
"path"
|
||||
"reflect"
|
||||
|
||||
"github.com/onsi/ginkgo/v2"
|
||||
"github.com/onsi/ginkgo/v2/types"
|
||||
|
||||
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
||||
@ -63,3 +64,9 @@ func AnnotatedLocationWithOffset(annotation string, offset int) types.CodeLocati
|
||||
codeLocation = types.NewCustomCodeLocation(annotation + " | " + codeLocation.String())
|
||||
return codeLocation
|
||||
}
|
||||
|
||||
// ConformanceIt is wrapper function for ginkgo It. Adds "[Conformance]" tag and makes static analysis easier.
|
||||
func ConformanceIt(text string, args ...interface{}) bool {
|
||||
args = append(args, ginkgo.Offset(1))
|
||||
return ginkgo.It(text+" [Conformance]", args...)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user