kaichiachen commented on code in PR #950:
URL: https://github.com/apache/yunikorn-k8shim/pull/950#discussion_r1951923891
##########
pkg/client/apifactory_mock.go:
##########
@@ -398,11 +398,21 @@ func (m *MockedAPIProvider) UpdatePriorityClass(oldObj
*schedv1.PriorityClass, n
}
func (m *MockedAPIProvider) GetPodBindStats() BindStats {
- return m.clients.KubeClient.(*KubeClientMock).GetBindStats()
+ client, ok := m.clients.KubeClient.(*KubeClientMock)
+ if !ok {
+ log.Log(log.Test).Error("failed to get KubeClientMock")
+ return BindStats{}
+ }
Review Comment:
Hi @wilfred-s , I checked the usage of `GetPodBindStats`, and it is only
referenced in *_test.go. IMHO, hitting a panic in ut files should be
acceptable, right?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]