-
Notifications
You must be signed in to change notification settings - Fork 363
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
Fix an issue when generating ExternalEntity from ExternalNode #4259
Conversation
Codecov Report
@@ Coverage Diff @@
## main #4259 +/- ##
==========================================
- Coverage 61.30% 59.61% -1.69%
==========================================
Files 388 378 -10
Lines 55145 54682 -463
==========================================
- Hits 33806 32601 -1205
- Misses 18799 19621 +822
+ Partials 2540 2460 -80
|
a43990b
to
04e0766
Compare
04e0766
to
8797d1f
Compare
8797d1f
to
08f3a80
Compare
ExternalNode: "vm1", | ||
}, | ||
} | ||
testDeleteExternalNode(t, externalNode, expectedEntity) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as testAddExternalNode
, separting input and test code makes the test less readable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated.
informerFactory.WaitForCacheSync(stopCh) | ||
err := controller.reconcileExternalNodes() | ||
require.NoError(t, err) | ||
err = wait.PollImmediate(time.Millisecond*50, time.Second, func() (done bool, err error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unlike other tests that rely on Run
method to create/delete objects asynchronously, reconcileExternalNodes
does everything synchronously, I think it should do the following check immediately and one-time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated.
08f3a80
to
717d13b
Compare
717d13b
to
45548ac
Compare
1. Use group/apiversion for ownerreference when creating ExternalEntity from ExternalNode 2. Add unit tests for ExternalNodeController Signed-off-by: wenyingd <wenyingd@vmware.com>
45548ac
to
944620d
Compare
/test-all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The unit test failure is a known issue on main branch: #4294, no need to rerun. |
…-io#4259) 1. Use group/apiversion for ownerreference when creating ExternalEntity from ExternalNode 2. Add unit tests for ExternalNodeController Signed-off-by: wenyingd <wenyingd@vmware.com>
Signed-off-by: wenyingd wenyingd@vmware.com