Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor pkg/agent/proxy/proxier_test.go #6420

Merged
merged 1 commit into from
Jun 12, 2024

Conversation

hongliangl
Copy link
Contributor

Refine test functions with multiple parameters and add some UDP Service tests.

@hongliangl hongliangl added the area/test Issues or PRs related to unit and integration tests. label Jun 7, 2024
@hongliangl hongliangl force-pushed the 20240607-refactor-proxy-test branch from 27aa9ef to 9205888 Compare June 7, 2024 07:01
pkg/agent/proxy/proxier_test.go Outdated Show resolved Hide resolved
pkg/agent/proxy/proxier_test.go Outdated Show resolved Hide resolved
pkg/agent/proxy/proxier_test.go Outdated Show resolved Hide resolved
pkg/agent/proxy/proxier_test.go Outdated Show resolved Hide resolved
pkg/agent/proxy/proxier_test.go Outdated Show resolved Hide resolved
loadBalancerIPs []net.IP,
updatedLoadBalancerIPs []net.IP,
isIPv6 bool) {
func testServiceIngressIPsAndExternalIPsUpdate(t *testing.T, bindingProtocol binding.Protocol, isIPv6 bool) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why rename this test? I think that "ExternalIPs" would be included in the term "IngressIPs", just like "LoadbalancerIP".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about renaming it to testServiceExternalIPsUpdate? I saw that externalIP is used to represent LoadBalncerIP and externalIP in our code:

func (c *Client) AddExternalIPRoute(externalIP net.IP) error {
.

Copy link
Contributor Author

@hongliangl hongliangl Jun 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I renamed this because I thought that the term ingresIPs is an alias of the term LoadBalancerIP.

Copy link
Contributor

@antoninbas antoninbas Jun 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually think that IngressIPs is less ambiguous in this case (given that ExternalIPs is a specific kind of Service IP in itself), but I don't feel very strongly either way.

Refine test functions with multiple parameters and add some UDP Service
tests.

Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
Copy link
Contributor

@antoninbas antoninbas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, @tnqn do you want to take a look as well?

Copy link
Member

@tnqn tnqn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tnqn
Copy link
Member

tnqn commented Jun 12, 2024

/skip-all

@tnqn tnqn merged commit 661e4b8 into antrea-io:main Jun 12, 2024
52 of 55 checks passed
@tnqn tnqn added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Jun 12, 2024
@hongliangl hongliangl deleted the 20240607-refactor-proxy-test branch June 12, 2024 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/test Issues or PRs related to unit and integration tests. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants