mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 04:06:03 +00:00
Merge pull request #53080 from jennybuckley/podpresets-test-skip
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Skip podpreset test if the alpha feature setttings/v1alpha1 is disabled **What this PR does / why we need it**: Skip this test if it is not able to find the requested resource, so the test does not consistently fail. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #53079 **Special notes for your reviewer**: **Release note**: ```release-note Skip podpreset test if the alpha feature setttings/v1alpha1 is disabled ```
This commit is contained in:
commit
49b4a514d8
@ -14,6 +14,7 @@ go_library(
|
||||
"//vendor/github.com/onsi/gomega:go_default_library",
|
||||
"//vendor/k8s.io/api/core/v1:go_default_library",
|
||||
"//vendor/k8s.io/api/settings/v1alpha1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/labels:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/watch:go_default_library",
|
||||
|
@ -23,6 +23,7 @@ import (
|
||||
|
||||
"k8s.io/api/core/v1"
|
||||
settings "k8s.io/api/settings/v1alpha1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/apimachinery/pkg/watch"
|
||||
@ -73,6 +74,9 @@ var _ = SIGDescribe("[Feature:PodPreset] PodPreset", func() {
|
||||
}
|
||||
|
||||
_, err := createPodPreset(f.ClientSet, f.Namespace.Name, pip)
|
||||
if errors.IsNotFound(err) {
|
||||
framework.Skipf("podpresets requires k8s.io/api/settings/v1alpha1 to be enabled")
|
||||
}
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
By("creating the pod")
|
||||
@ -178,6 +182,9 @@ var _ = SIGDescribe("[Feature:PodPreset] PodPreset", func() {
|
||||
}
|
||||
|
||||
_, err := createPodPreset(f.ClientSet, f.Namespace.Name, pip)
|
||||
if errors.IsNotFound(err) {
|
||||
framework.Skipf("podpresets requires k8s.io/api/settings/v1alpha1 to be enabled")
|
||||
}
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
By("creating the pod")
|
||||
|
Loading…
Reference in New Issue
Block a user