@@ -1061,7 +1061,10 @@ var _ = Describe("The Openshift Notebook controller", func() {
1061
1061
By ("Ensuring finalizer exists first" )
1062
1062
Eventually (func () []string {
1063
1063
var updated nbv1.Notebook
1064
- cli .Get (ctx , notebookKey , & updated )
1064
+ err := cli .Get (ctx , notebookKey , & updated )
1065
+ if err != nil {
1066
+ return nil
1067
+ }
1065
1068
return updated .Finalizers
1066
1069
}, duration , interval ).Should (ContainElement (Finalizer ))
1067
1070
@@ -1083,7 +1086,10 @@ var _ = Describe("The Openshift Notebook controller", func() {
1083
1086
By ("Ensuring prerequisite resources exist" )
1084
1087
Eventually (func () []string {
1085
1088
var updated nbv1.Notebook
1086
- cli .Get (ctx , notebookKey , & updated )
1089
+ err := cli .Get (ctx , notebookKey , & updated )
1090
+ if err != nil {
1091
+ return nil
1092
+ }
1087
1093
return updated .Finalizers
1088
1094
}, duration , interval ).Should (ContainElement (Finalizer ))
1089
1095
@@ -1100,8 +1106,10 @@ var _ = Describe("The Openshift Notebook controller", func() {
1100
1106
By ("Verifying notebook is marked for deletion but persists due to finalizer" )
1101
1107
Eventually (func () bool {
1102
1108
var updated nbv1.Notebook
1103
- err := cli .Get (ctx , notebookKey , & updated )
1104
- return err == nil && updated .DeletionTimestamp != nil
1109
+ if err := cli .Get (ctx , notebookKey , & updated ); err != nil {
1110
+ return false
1111
+ }
1112
+ return updated .DeletionTimestamp != nil
1105
1113
}, duration , interval ).Should (BeTrue (),
1106
1114
"Notebook should be marked for deletion but persist due to finalizer" )
1107
1115
@@ -1120,7 +1128,7 @@ var _ = Describe("The Openshift Notebook controller", func() {
1120
1128
Eventually (func () error {
1121
1129
var oauth oauthv1.OAuthClient
1122
1130
return cli .Get (ctx , oauthClientKey , & oauth )
1123
- }, time . Second * 30 ).Should (MatchError (ContainSubstring ("not found" )))
1131
+ }, duration , interval ).Should (MatchError (ContainSubstring ("not found" )))
1124
1132
1125
1133
By ("Verifying finalizer is removed and notebook is deleted" )
1126
1134
Eventually (func () error {
0 commit comments