pbacsko commented on code in PR #1052:
URL: https://github.com/apache/yunikorn-k8shim/pull/1052#discussion_r3701889519


##########
pkg/cache/context.go:
##########
@@ -884,6 +888,13 @@ func (ctx *Context) AssumePod(name, node string) error {
        return nil
 }
 
+func (ctx *Context) assumePodShouldInjectError() bool {
+       clientSet := ctx.apiProvider.GetAPIs().KubeClient.GetClientSet()
+       _, err := clientSet.CoreV1().ConfigMaps(ctx.namespace).Get(
+               context.TODO(), constants.FaultInjectConfigMapName, 
metav1.GetOptions{})
+       return err == nil
+}
+

Review Comment:
   > I know that it is an ugly hack. But MockScheduler can not simulate 
complete end to end tests. That is the reason, I have added this as the proof 
that the change is working.
   
   Have you discussed this with @wilfred-s? What's his take on this approach?
   
   It's perfectly OK to have this as an integration test. I had to do the same 
when I fixed YUNIKORN-2520. The goal is to verify the inner workings of 
shim+core when performing a scheduling cycle. I don't see an added value of an 
e2e tests, especially when it comes with such maintainbility costs. 



-- 
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]

Reply via email to