Merge pull request #93704 from SergeyKanzhelev/PodReasonUnschedulableIsNotAType

PodReasonUnschedulable is not a pod condition type
This commit is contained in:
Kubernetes Prow Robot 2020-08-28 08:04:31 -07:00 committed by GitHub
commit 617f17f238
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -17,7 +17,7 @@ limitations under the License.
package types
import (
"k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
)
// PodConditionsByKubelet is the list of pod conditions owned by kubelet
@ -25,7 +25,6 @@ var PodConditionsByKubelet = []v1.PodConditionType{
v1.PodScheduled,
v1.PodReady,
v1.PodInitialized,
v1.PodReasonUnschedulable,
v1.ContainersReady,
}

View File

@ -17,8 +17,9 @@ limitations under the License.
package types
import (
"k8s.io/api/core/v1"
"testing"
v1 "k8s.io/api/core/v1"
)
func TestPodConditionByKubelet(t *testing.T) {
@ -26,7 +27,7 @@ func TestPodConditionByKubelet(t *testing.T) {
v1.PodScheduled,
v1.PodReady,
v1.PodInitialized,
v1.PodReasonUnschedulable,
v1.ContainersReady,
}
for _, tc := range trueCases {
@ -37,6 +38,7 @@ func TestPodConditionByKubelet(t *testing.T) {
falseCases := []v1.PodConditionType{
v1.PodConditionType("abcd"),
v1.PodConditionType(v1.PodReasonUnschedulable),
}
for _, tc := range falseCases {