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

Share test functions between e2e and multicluster e2e package #3424

Merged
merged 1 commit into from
Mar 25, 2022

Conversation

Dyanngg
Copy link
Contributor

@Dyanngg Dyanngg commented Mar 9, 2022

Main changes:

  • Export some functions from /test/e2e.TestData so that they can be reused by multi-cluster e2e pkg.
  • Changed some util functions' receiver from k8sUtils to TestData so that they can be reused by multi-cluster e2e pkg.
  • In multi-cluster e2e pkg, instantiate a new MCTestData which has copies of TestData of each cluster, instead of creating an entirely new TestData struct.

Signed-off-by: Yang Ding [email protected]

@Dyanngg Dyanngg added this to the Antrea v1.6 release milestone Mar 9, 2022
@Dyanngg Dyanngg requested review from hjiajing and luolanzone March 9, 2022 07:25
@codecov-commenter
Copy link

codecov-commenter commented Mar 9, 2022

Codecov Report

Merging #3424 (b995d2f) into main (2dcc257) will decrease coverage by 2.80%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3424      +/-   ##
==========================================
- Coverage   65.51%   62.71%   -2.81%     
==========================================
  Files         277      277              
  Lines       27500    37775   +10275     
==========================================
+ Hits        18016    23689    +5673     
- Misses       7567    12100    +4533     
- Partials     1917     1986      +69     
Flag Coverage Δ
e2e-tests 53.98% <ø> (?)
kind-e2e-tests 53.94% <ø> (-1.89%) ⬇️
unit-tests 43.02% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/agent/cniserver/pod_configuration_linux.go 26.31% <0.00%> (-40.36%) ⬇️
pkg/controller/ipam/antrea_ipam_controller.go 48.71% <0.00%> (-31.57%) ⬇️
pkg/controller/networkpolicy/endpoint_querier.go 61.46% <0.00%> (-29.97%) ⬇️
pkg/controller/egress/controller.go 62.19% <0.00%> (-26.26%) ⬇️
pkg/controller/ipam/validate.go 57.95% <0.00%> (-24.31%) ⬇️
pkg/agent/cniserver/ipam/antrea_ipam_controller.go 56.66% <0.00%> (-23.34%) ⬇️
pkg/agent/cniserver/ipam/antrea_ipam.go 57.24% <0.00%> (-22.55%) ⬇️
pkg/agent/util/iptables/lock.go 60.00% <0.00%> (-21.82%) ⬇️
pkg/controller/egress/store/egressgroup.go 37.93% <0.00%> (-21.80%) ⬇️
pkg/controller/externalippool/validate.go 55.17% <0.00%> (-21.02%) ⬇️
... and 237 more

@Dyanngg Dyanngg force-pushed the antrea-mcs-e2e-refactor branch from c310540 to 5021c26 Compare March 9, 2022 07:56
@Dyanngg
Copy link
Contributor Author

Dyanngg commented Mar 9, 2022

/test-multicluster-e2e

@Dyanngg Dyanngg force-pushed the antrea-mcs-e2e-refactor branch from 5021c26 to 2f95ee6 Compare March 9, 2022 19:13
@Dyanngg
Copy link
Contributor Author

Dyanngg commented Mar 9, 2022

/test-all

@Dyanngg
Copy link
Contributor Author

Dyanngg commented Mar 9, 2022

/test-all-features-conformance

@Dyanngg
Copy link
Contributor Author

Dyanngg commented Mar 9, 2022

/cc @enhaocui as this might conflict with #3286. Specifically, that PR might need to be rebased on the current one

@Dyanngg Dyanngg added the area/test/e2e Issues or PRs related to Antrea specific end-to-end testing. label Mar 9, 2022
@Dyanngg Dyanngg requested review from tnqn and antoninbas March 9, 2022 23:20
@luolanzone luolanzone added the area/multi-cluster Issues or PRs related to multi cluster. label Mar 10, 2022
multicluster/test/e2e/framework.go Outdated Show resolved Hide resolved
multicluster/test/e2e/framework.go Outdated Show resolved Hide resolved
multicluster/test/e2e/framework.go Outdated Show resolved Hide resolved
multicluster/test/e2e/main_test.go Outdated Show resolved Hide resolved
multicluster/test/e2e/main_test.go Outdated Show resolved Hide resolved
test/e2e/main_test.go Outdated Show resolved Hide resolved
@Dyanngg Dyanngg force-pushed the antrea-mcs-e2e-refactor branch from 2f95ee6 to e480f7e Compare March 10, 2022 18:45
@Dyanngg
Copy link
Contributor Author

Dyanngg commented Mar 10, 2022

/test-all

@Dyanngg
Copy link
Contributor Author

Dyanngg commented Mar 10, 2022

/test-e2e /test-multicluster-e2e /test-windows-e2e

@Dyanngg Dyanngg force-pushed the antrea-mcs-e2e-refactor branch 2 times, most recently from eeb9010 to 176ffd3 Compare March 10, 2022 22:54
@Dyanngg
Copy link
Contributor Author

Dyanngg commented Mar 10, 2022

/test-all /test-multicluster-e2e

@Dyanngg Dyanngg force-pushed the antrea-mcs-e2e-refactor branch from 176ffd3 to 863a55f Compare March 15, 2022 19:34
@Dyanngg
Copy link
Contributor Author

Dyanngg commented Mar 15, 2022

Rebased and resolved merge conflicts /test-all /test-multicluster-e2e

@Dyanngg Dyanngg requested a review from luolanzone March 15, 2022 21:10
@luolanzone
Copy link
Contributor

/test-e2e

@luolanzone
Copy link
Contributor

Hi @tnqn Could you help to take a look at this PR, let us know if there is any other test need to be verified beside test-all and test-multicluster-e2e? thanks.

luolanzone
luolanzone previously approved these changes Mar 18, 2022
Copy link
Contributor

@luolanzone luolanzone left a comment

Choose a reason for hiding this comment

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

LGTM

@Dyanngg
Copy link
Contributor Author

Dyanngg commented Mar 20, 2022

Rebase and resolved merge conflicts /test-all

@Dyanngg Dyanngg force-pushed the antrea-mcs-e2e-refactor branch from 9e66392 to 5f0d376 Compare March 20, 2022 03:44
@Dyanngg
Copy link
Contributor Author

Dyanngg commented Mar 21, 2022

/test-all /test-multicluster-e2e

@Dyanngg Dyanngg force-pushed the antrea-mcs-e2e-refactor branch 2 times, most recently from 2bb7381 to b9c5359 Compare March 22, 2022 21:09
@Dyanngg
Copy link
Contributor Author

Dyanngg commented Mar 22, 2022

Rebase and resolved merge conflicts /test-all /test-multicluster-e2e

@luolanzone
Copy link
Contributor

I didn't see test being triggered, trigger them again.
/test-all
/test-multicluster-e2e

@XinShuYang
Copy link
Contributor

/test-multicluster-e2e

luolanzone
luolanzone previously approved these changes Mar 23, 2022
Copy link
Contributor

@luolanzone luolanzone left a comment

Choose a reason for hiding this comment

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

two nits.

test/e2e/main_test.go Show resolved Hide resolved
test/e2e/framework.go Outdated Show resolved Hide resolved
@Dyanngg
Copy link
Contributor Author

Dyanngg commented Mar 24, 2022

/test-all /test-multicluster-e2e

luolanzone
luolanzone previously approved these changes Mar 24, 2022
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 overall, PR needs rebasing.

multicluster/test/e2e/framework.go Outdated Show resolved Hide resolved
multicluster/test/e2e/service_test.go Outdated Show resolved Hide resolved
multicluster/test/e2e/service_test.go Outdated Show resolved Hide resolved
@tnqn
Copy link
Member

tnqn commented Mar 24, 2022

In commit message title: s/andd/and/

@Dyanngg Dyanngg force-pushed the antrea-mcs-e2e-refactor branch from 69e9d9f to b995d2f Compare March 24, 2022 18:39
@Dyanngg
Copy link
Contributor Author

Dyanngg commented Mar 24, 2022

/test-all /test-multicluster-e2e

@tnqn
Copy link
Member

tnqn commented Mar 25, 2022

/skip-integration change doesn't affect integration test

@tnqn tnqn merged commit 5a214e5 into antrea-io:main Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/multi-cluster Issues or PRs related to multi cluster. area/test/e2e Issues or PRs related to Antrea specific end-to-end testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants