forked from antrea-io/antrea
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RemoteCluster Tests ------------------- Test that member announce is written and connectivity is set to true. TODO: Find out if fakeClient can error writes so we can test disconnection case NOTE: used mockgen to generate mocks for Manager from controller-runtime library and for RemoteClusterManager. TODO: Add mockgen to Makefile so it always gets generated automatically. RemoteClusterManager and LeaderElector tests -------------------------------------------- Test adding a new cluster and leader election Test leader election when elected leader becomes disconnected TODO: test removing a cluster NOTE: Used pegomock to generate a mock for RemoteCluster so that we can verify StartMonitoring is invoked. TODO: Use mockgen instead but for now couldnt get it working due to RemoteCluster embedding CommonArea interface (Ref:golang/mock#85) Also had to edit the mock file generated by pegomock due to go test complaining of a race in mock code. Added a mutex lock in the mock code although ideally we should not edit generated mock files Signed-off-by: Aravinda Kidambi <akidambi@vmware.com>
- Loading branch information
1 parent
8fe1466
commit b60314e
Showing
11 changed files
with
1,499 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
129 changes: 129 additions & 0 deletions
129
multicluster/controllers/multicluster/core/mock_remote_cluster_manager.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.