Skip to content

Commit f0ed0f4

Browse files
author
Nont
committed
Fix comments
Signed-off-by: Nont <[email protected]>
1 parent 203407e commit f0ed0f4

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

pkg/webhook/managedresource/createordelete_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -377,17 +377,17 @@ func TestGetVAPWithMutator(t *testing.T) {
377377
}
378378

379379
// Verify mutate function works
380-
originalVAP := vap.DeepCopy()
381-
expectedVAP := getValidatingAdmissionPolicy(tt.isHub)
380+
gotVAP := vap.DeepCopy()
381+
wantVAP := getValidatingAdmissionPolicy(tt.isHub)
382382
ignoreOpts := cmp.Options{
383383
cmpopts.IgnoreFields(metav1.ObjectMeta{}, "ResourceVersion", "ManagedFields", "Generation"),
384384
}
385-
if diff := cmp.Diff(expectedVAP, vap, ignoreOpts); diff != "" {
385+
if diff := cmp.Diff(wantVAP, vap, ignoreOpts); diff != "" {
386386
t.Errorf("VAP after mutation mismatch (-want +got):\n%s", diff)
387387
}
388388

389389
vap.Spec = admv1.ValidatingAdmissionPolicySpec{} // Reset spec to empty to test idempotency
390-
if diff := cmp.Diff(originalVAP, vap); diff == "" {
390+
if diff := cmp.Diff(gotVAP, vap); diff == "" {
391391
t.Error("VAP should be different after mutation")
392392
}
393393

@@ -396,7 +396,7 @@ func TestGetVAPWithMutator(t *testing.T) {
396396
if err != nil {
397397
t.Errorf("second mutateFunc() = %v, want nil", err)
398398
}
399-
if diff := cmp.Diff(expectedVAP, vap, ignoreOpts); diff != "" {
399+
if diff := cmp.Diff(wantVAP, vap, ignoreOpts); diff != "" {
400400
t.Errorf("VAP after second mutation mismatch (-want +got):\n%s", diff)
401401
}
402402
})

pkg/webhook/managedresource/validatingadmissionpolicy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1111
)
1212

13-
// TODO use a differnt name for binding to simplify the code
13+
// TODO use a different name for binding to simplify the code
1414
// and add a migration path
1515
const resourceName = "aks-fleet-managed-by-arm"
1616

test/e2e/managed_resource_vap_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,6 @@ func checkVAPAndBindingAbsence(c *framework.Cluster) {
189189
}
190190

191191
var _ = Describe("ValidatingAdmissionPolicy for Managed Resources", Label("managedresource"), Ordered, func() {
192-
193192
Context("Version-agnostic tests", func() {
194193
It("should allow operations on unmanaged namespace for non-system:masters user", func() {
195194
unmanagedNS := createUnmanagedNamespace("test-unmanaged-ns")

0 commit comments

Comments
 (0)