Skip to content

Commit

Permalink
fix ut
Browse files Browse the repository at this point in the history
Signed-off-by: hantmac <[email protected]>
  • Loading branch information
hantmac committed Mar 8, 2024
1 parent 0af51ff commit 603a441
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ func (h *DaemonSetCreateUpdateHandler) validateDaemonSetUpdate(ds, oldDs *appsv1
if !apiequality.Semantic.DeepEqual(daemonset.Spec, oldDs.Spec) {
allErrs = append(allErrs, field.Forbidden(field.NewPath("spec"), "updates to daemonset spec for fields other than 'BurstReplicas', 'template', 'lifecycle', 'updateStrategy', 'minReadySeconds', and 'revisionHistoryLimit' are forbidden"))
}
allErrs = append(allErrs, validateDaemonSetSpec(&ds.Spec, field.NewPath("spec"))...)
return allErrs
}

Expand Down
5 changes: 0 additions & 5 deletions pkg/webhook/daemonset/validating/daemonset_validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ func TestValidateDaemonSetUpdate(t *testing.T) {
}
intOrStr1 := intstr.FromInt(1)
intOrStr2 := intstr.FromInt(2)
intOrStr3 := intstr.FromInt(3)
successCases := []testCase{
{
spec: &appsv1alpha1.DaemonSetSpec{
Expand All @@ -137,7 +136,6 @@ func TestValidateDaemonSetUpdate(t *testing.T) {
Type: appsv1alpha1.RollingUpdateDaemonSetStrategyType,
RollingUpdate: &appsv1alpha1.RollingUpdateDaemonSet{
MaxUnavailable: &intOrStr1,
MaxSurge: &intOrStr2,
},
},
},
Expand All @@ -149,7 +147,6 @@ func TestValidateDaemonSetUpdate(t *testing.T) {
Type: appsv1alpha1.RollingUpdateDaemonSetStrategyType,
RollingUpdate: &appsv1alpha1.RollingUpdateDaemonSet{
MaxUnavailable: &intOrStr1,
MaxSurge: &intOrStr2,
},
},
},
Expand All @@ -163,7 +160,6 @@ func TestValidateDaemonSetUpdate(t *testing.T) {
Type: appsv1alpha1.RollingUpdateDaemonSetStrategyType,
RollingUpdate: &appsv1alpha1.RollingUpdateDaemonSet{
MaxUnavailable: &intOrStr1,
MaxSurge: &intOrStr3,
},
},
},
Expand All @@ -175,7 +171,6 @@ func TestValidateDaemonSetUpdate(t *testing.T) {
Type: appsv1alpha1.RollingUpdateDaemonSetStrategyType,
RollingUpdate: &appsv1alpha1.RollingUpdateDaemonSet{
MaxUnavailable: &intOrStr1,
MaxSurge: &intOrStr2,
},
},
},
Expand Down

0 comments on commit 603a441

Please sign in to comment.