mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 21:17:23 +00:00
Update conformance requirement check
After solving the issue https://github.com/kubernetes/kubernetes/issues/87047 skip functions have been moved to e2eskipper from e2e framework. This updates the conformance requirement check to follow the move.
This commit is contained in:
parent
6858c25ee4
commit
7b44ad0606
@ -57,5 +57,6 @@
|
|||||||
"k8s.io/kubernetes/test/e2e/framework/pod": "e2epod",
|
"k8s.io/kubernetes/test/e2e/framework/pod": "e2epod",
|
||||||
"k8s.io/kubernetes/test/e2e/framework/resource": "e2eresource",
|
"k8s.io/kubernetes/test/e2e/framework/resource": "e2eresource",
|
||||||
"k8s.io/kubernetes/test/e2e/framework/service": "e2eservice",
|
"k8s.io/kubernetes/test/e2e/framework/service": "e2eservice",
|
||||||
|
"k8s.io/kubernetes/test/e2e/framework/skipper": "e2eskipper",
|
||||||
"k8s.io/kubernetes/test/e2e/framework/ssh": "e2essh"
|
"k8s.io/kubernetes/test/e2e/framework/ssh": "e2essh"
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ const (
|
|||||||
//e.g. framework.ConformanceIt("should provide secure master service ", func() {
|
//e.g. framework.ConformanceIt("should provide secure master service ", func() {
|
||||||
patternStartConformance = `framework.ConformanceIt\(.*, func\(\) {$`
|
patternStartConformance = `framework.ConformanceIt\(.*, func\(\) {$`
|
||||||
patternEndConformance = `}\)$`
|
patternEndConformance = `}\)$`
|
||||||
patternSkip = `framework.Skip.*\(`
|
patternSkip = `e2eskipper.Skip.*\(`
|
||||||
)
|
)
|
||||||
|
|
||||||
// This function checks the requirement: it works for all providers (e.g., no SkipIfProviderIs/SkipUnlessProviderIs calls)
|
// This function checks the requirement: it works for all providers (e.g., no SkipIfProviderIs/SkipUnlessProviderIs calls)
|
||||||
@ -64,7 +64,7 @@ func checkAllProviders(e2eFile string) error {
|
|||||||
if inConformanceCode {
|
if inConformanceCode {
|
||||||
if regSkip.MatchString(line) {
|
if regSkip.MatchString(line) {
|
||||||
// To list all invalid places in a single operation of this tool, here doesn't return error and continues checking.
|
// To list all invalid places in a single operation of this tool, here doesn't return error and continues checking.
|
||||||
fmt.Fprintf(os.Stderr, "%v: Conformance test should not call any framework.Skip*()\n", e2eFile)
|
fmt.Fprintf(os.Stderr, "%v: Conformance test should not call any e2eskipper.Skip*()\n", e2eFile)
|
||||||
checkFailed = true
|
checkFailed = true
|
||||||
}
|
}
|
||||||
if regEndConformance.MatchString(line) {
|
if regEndConformance.MatchString(line) {
|
||||||
|
Loading…
Reference in New Issue
Block a user