Skip to content

Commit

Permalink
Add indirect function in router cleanup helper function
Browse files Browse the repository at this point in the history
  • Loading branch information
deadlycoconuts committed Mar 15, 2024
1 parent 88eeb26 commit 3e72566
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/e2e/test/cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ func CleanupRouterDeployment(
names := make([]string, slice.Len())

for i := 0; i < slice.Len(); i++ {
names[i] = slice.Index(i).FieldByName("ObjectMeta").
// The use of indirect is needed to handle VirtualServices which are returned by Istio as a list of pointers
names[i] = reflect.Indirect(slice.Index(i)).FieldByName("ObjectMeta").
Interface().(metav1.ObjectMeta).Name
}
return names
Expand Down

0 comments on commit 3e72566

Please sign in to comment.