Merge pull request #111577 from brianpursley/troubleshoot-unit-test-flake

Add logging for reconciler unit test
This commit is contained in:
Kubernetes Prow Robot 2022-11-11 00:44:09 -08:00 committed by GitHub
commit d7bff1c809
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1582,6 +1582,7 @@ func verifyVolumeAttachedToNode(
attachState, attachState,
expectedAttachState) expectedAttachState)
} }
t.Logf("Volume <%v> is attached to node <%v>: %v", volumeName, nodeName, attachState)
} }
func verifyVolumeReportedAsAttachedToNode( func verifyVolumeReportedAsAttachedToNode(
@ -1600,6 +1601,7 @@ func verifyVolumeReportedAsAttachedToNode(
} }
if result == isAttached { if result == isAttached {
t.Logf("Volume <%v> is reported as attached to node <%v>: %v", volumeName, nodeName, result)
return return
} }
t.Fatalf("Check volume <%v> is reported as attached to node <%v>, got %v, expected %v", t.Fatalf("Check volume <%v> is reported as attached to node <%v>, got %v, expected %v",
@ -1624,6 +1626,7 @@ func verifyVolumeNoStatusUpdateNeeded(
nodeName) nodeName)
} }
} }
t.Logf("Volume <%v> is not reported as need to update status on node <%v>", volumeName, nodeName)
} }
func verifyNewDetacherCallCount( func verifyNewDetacherCallCount(