Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
```
Browse files Browse the repository at this point in the history
[MESH-5515] Rename validateServiceEntry to validateServiceEntryEndpoints
Punakshi committed Sep 13, 2024
1 parent fc13fc4 commit eb9ceec
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions admiral/pkg/clusters/serviceentry.go
Original file line number Diff line number Diff line change
@@ -1504,7 +1504,7 @@ func AddServiceEntriesWithDrWorker(
compareLabels)
util.LogElapsedTimeSinceTask(ctxLogger, "ReconcileServiceEntry", "", "", cluster, "", start)

valid, validityError := validateServiceEntry(newServiceEntry)
valid, validityError := validateServiceEntryEndpoints(newServiceEntry)
if seReconciliationRequired && valid && validityError == nil {
err = addUpdateServiceEntry(ctxLogger, ctx, newServiceEntry, oldServiceEntry, syncNamespace, rc)
addSEorDRToAClusterError = common.AppendError(addSEorDRToAClusterError, err)
@@ -1610,7 +1610,7 @@ func AddServiceEntriesWithDrWorker(
}
}

func validateServiceEntry(entry *v1alpha3.ServiceEntry) (bool, error) {
func validateServiceEntryEndpoints(entry *v1alpha3.ServiceEntry) (bool, error) {
// loop through all endpoints and check locality and istio mode labels
var errorStrings []string

2 changes: 1 addition & 1 deletion admiral/pkg/clusters/serviceentry_test.go
Original file line number Diff line number Diff line change
@@ -10188,7 +10188,7 @@ func TestValidateLocalityInServiceEntry(t *testing.T) {
}

for _, tt := range testCases {
result, err := validateServiceEntry(tt.entry)
result, err := validateServiceEntryEndpoints(tt.entry)
if result != tt.expected {
t.Errorf("Test failed: %s \nExpected: %v \nGot: %v", tt.name, tt.expected, result)
}

0 comments on commit eb9ceec

Please sign in to comment.