ryankert01 commented on code in PR #947:
URL: https://github.com/apache/yunikorn-k8shim/pull/947#discussion_r1923481775
##########
test/e2e/persistent_volume/persistent_volume_test.go:
##########
@@ -338,19 +342,29 @@ func createNfsProvisioner(svaName string, serverName
string, scName string) {
func deleteNfsRelatedRoles(serviceAccount string, clusterRole string,
clusterRoleBinding string) {
ginkgo.By("Deleting NFS related roles and bindings")
err := kClient.DeleteClusterRoleBindings(clusterRoleBinding)
+ if err != nil && !k8serrors.IsNotFound(err) {
+ Ω(err).NotTo(HaveOccurred())
+ }
+
err2 := kClient.DeleteClusterRole(clusterRole)
- err3 := kClient.DeleteServiceAccount(serviceAccount, dev)
+ if err2 != nil && !k8serrors.IsNotFound(err2) {
Review Comment:
Why assert only when k8serror is found?
--
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]