Fix TestPodSidecarLabelChangeTriggersAddIptablesAction flake#636
Fix TestPodSidecarLabelChangeTriggersAddIptablesAction flake#636kmesh-bot merged 2 commits intokmesh-net:mainfrom
Conversation
Signed-off-by: Zhonghu Xu <xuzhonghu@huawei.com>
pkg/controller/bypass/bypass_test.go
Outdated
| client := fake.NewSimpleClientset(namespace) | ||
| c := NewByPassController(client) | ||
| go c.Run(stopCh) | ||
| cache.WaitForCacheSync(stopCh, c.pod.HasSynced) |
There was a problem hiding this comment.
This is the root cause
There was a problem hiding this comment.
i am also fixing it. you can directly call c.Run(stopCh), just remove go.
There is already cache.WaitForCacheSync(stopCh, c.pod.HasSynced) in c.Run
Codecov ReportAll modified and coverable lines are covered by tests ✅
... and 3 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
|
i also found that the NODE_NAME env is not aligned with the one in the test pod's |
|
They should match. Weired, why the test passed |
|
Oh, it is because fake client does not support field selector, which actually works in kube-apiserver |
|
ping @supercharge-xsy |
|
@hzxuzhonghu maybe this PR could be merged? |
|
@nlgwcy I thought it was merged |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Okabe-Rintarou-0, supercharge-xsy The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: