change preempting to PreemptionPolicy
This commit is contained in:
@@ -22,11 +22,11 @@ import (
|
||||
"sort"
|
||||
"testing"
|
||||
|
||||
fuzz "github.com/google/gofuzz"
|
||||
"github.com/google/gofuzz"
|
||||
|
||||
apiv1 "k8s.io/api/core/v1"
|
||||
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
|
||||
roundtrip "k8s.io/apimachinery/pkg/api/apitesting/roundtrip"
|
||||
"k8s.io/apimachinery/pkg/api/apitesting/roundtrip"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
@@ -147,8 +147,6 @@ func TestDefaulting(t *testing.T) {
|
||||
{Group: "storage.k8s.io", Version: "v1", Kind: "StorageClass"}: {},
|
||||
{Group: "storage.k8s.io", Version: "v1", Kind: "StorageClassList"}: {},
|
||||
{Group: "authentication.k8s.io", Version: "v1", Kind: "TokenRequest"}: {},
|
||||
{Group: "scheduling.k8s.io", Version: "v1", Kind: "PriorityClass"}: {},
|
||||
{Group: "scheduling.k8s.io", Version: "v1", Kind: "PriorityClassList"}: {},
|
||||
}
|
||||
|
||||
f := fuzz.New().NilChance(.5).NumElements(1, 1).RandSource(rand.NewSource(1))
|
||||
|
@@ -217,7 +217,7 @@ func TestRoundTripTypes(t *testing.T) {
|
||||
func TestEncodePtr(t *testing.T) {
|
||||
grace := int64(30)
|
||||
enableServiceLinks := v1.DefaultEnableServiceLinks
|
||||
preempting := v1.DefaultPreempting
|
||||
preemptNever := api.PreemptNever
|
||||
pod := &api.Pod{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Labels: map[string]string{"name": "foo"},
|
||||
@@ -231,7 +231,7 @@ func TestEncodePtr(t *testing.T) {
|
||||
SecurityContext: &api.PodSecurityContext{},
|
||||
SchedulerName: api.DefaultSchedulerName,
|
||||
EnableServiceLinks: &enableServiceLinks,
|
||||
Preempting: &preempting,
|
||||
PreemptionPolicy: &preemptNever,
|
||||
},
|
||||
}
|
||||
obj := runtime.Object(pod)
|
||||
|
Reference in New Issue
Block a user