registry: replace intstr.FromInt with intstr.FromInt32
This touches cases where FromInt() is used on numeric constants, or values which are already int32s, or int variables which are defined close by and can be changed to int32s with little impact. Signed-off-by: Stephen Kitt <skitt@redhat.com>
This commit is contained in:

committed by
Stephen Kitt

parent
f871d5fabe
commit
026e7c7cb3
@@ -43,7 +43,7 @@ func newStorage(t *testing.T) (*REST, *StatusREST, *etcd3testing.EtcdTestServer)
|
||||
}
|
||||
|
||||
func validNewPodDisruptionBudget() *policy.PodDisruptionBudget {
|
||||
minAvailable := intstr.FromInt(7)
|
||||
minAvailable := intstr.FromInt32(7)
|
||||
return &policy.PodDisruptionBudget{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "foo",
|
||||
@@ -91,7 +91,7 @@ func TestStatusUpdate(t *testing.T) {
|
||||
}
|
||||
obtainedPdb := obj.(*policy.PodDisruptionBudget)
|
||||
|
||||
minAvailable := intstr.FromInt(8)
|
||||
minAvailable := intstr.FromInt32(8)
|
||||
update := policy.PodDisruptionBudget{
|
||||
ObjectMeta: obtainedPdb.ObjectMeta,
|
||||
Spec: policy.PodDisruptionBudgetSpec{
|
||||
|
@@ -132,7 +132,7 @@ func testPodDisruptionBudgetStrategyWithUnhealthyPodEvictionPolicy(t *testing.T,
|
||||
}
|
||||
|
||||
validSelector := map[string]string{"a": "b"}
|
||||
minAvailable := intstr.FromInt(3)
|
||||
minAvailable := intstr.FromInt32(3)
|
||||
pdb := &policy.PodDisruptionBudget{
|
||||
ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault},
|
||||
Spec: policy.PodDisruptionBudgetSpec{
|
||||
@@ -196,7 +196,7 @@ func testPodDisruptionBudgetStrategy(t *testing.T) {
|
||||
}
|
||||
|
||||
validSelector := map[string]string{"a": "b"}
|
||||
minAvailable := intstr.FromInt(3)
|
||||
minAvailable := intstr.FromInt32(3)
|
||||
pdb := &policy.PodDisruptionBudget{
|
||||
ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault},
|
||||
Spec: policy.PodDisruptionBudgetSpec{
|
||||
@@ -267,8 +267,8 @@ func TestPodDisruptionBudgetStatusStrategy(t *testing.T) {
|
||||
t.Errorf("PodDisruptionBudgetStatus should not allow create on update")
|
||||
}
|
||||
|
||||
oldMinAvailable := intstr.FromInt(3)
|
||||
newMinAvailable := intstr.FromInt(2)
|
||||
oldMinAvailable := intstr.FromInt32(3)
|
||||
newMinAvailable := intstr.FromInt32(2)
|
||||
|
||||
validSelector := map[string]string{"a": "b"}
|
||||
oldPdb := &policy.PodDisruptionBudget{
|
||||
@@ -337,8 +337,8 @@ func TestPodDisruptionBudgetStatusValidationByApiVersion(t *testing.T) {
|
||||
APIVersion: tc.apiVersion,
|
||||
})
|
||||
|
||||
oldMaxUnavailable := intstr.FromInt(2)
|
||||
newMaxUnavailable := intstr.FromInt(3)
|
||||
oldMaxUnavailable := intstr.FromInt32(2)
|
||||
newMaxUnavailable := intstr.FromInt32(3)
|
||||
oldPdb := &policy.PodDisruptionBudget{
|
||||
ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault, ResourceVersion: "10"},
|
||||
Spec: policy.PodDisruptionBudgetSpec{
|
||||
|
Reference in New Issue
Block a user