craigcondit commented on a change in pull request #313:
URL:
https://github.com/apache/incubator-yunikorn-k8shim/pull/313#discussion_r732905569
##########
File path: pkg/cache/external/scheduler_cache_test.go
##########
@@ -169,7 +170,7 @@ func TestAddUnassignedPod(t *testing.T) {
assert.Check(t, cachedNode.Node() != nil, "host0001
exists in cache but the ref to v1.Node doesn't exist")
assert.Equal(t, cachedNode.Node().Name, node.Name)
assert.Equal(t, cachedNode.Node().UID, node.UID)
- assert.Equal(t, len(cachedNode.Pods()), 0)
+ assert.Assert(t, cachedNode != nil && cachedNode.Pods
== nil, "pods was not null")
Review comment:
As above, linter disagrees:
```
pkg/cache/external/scheduler_cache_test.go:172:35: SA5011: possible nil
pointer dereference (staticcheck)
assert.Equal(t, len(cachedNode.Pods), 0)
^
```
--
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]