@@ -149,7 +149,7 @@ def _connect(self, container_host: str | None = None, container_port: int | None
149
149
host = container_host or self .get_container_host_ip ()
150
150
port = container_port or self .get_exposed_port (self .port )
151
151
try :
152
- # if we did not enable cookies support here, with RStudio we'd end up looping and getting
152
+ # if we did not enable cookie support here, with RStudio we'd end up looping and getting
153
153
# HTTP 302 (i.e. `except urllib.error.HTTPError as e: assert e.code == 302`) every time
154
154
cookie_jar = http .cookiejar .CookieJar ()
155
155
opener = urllib .request .build_opener (urllib .request .HTTPCookieProcessor (cookie_jar ))
@@ -194,8 +194,15 @@ def skip_if_not_workbench_image(image: str) -> docker.models.images.Image:
194
194
195
195
def grab_and_check_logs (subtests : pytest_subtests .SubTests , container : WorkbenchContainer ) -> None :
196
196
# Here is a list of blocked keywords we don't want to see in the log messages during the container/workbench
197
- # startup (e.g. log messages from Jupyter IDE, code-server IDE or RStudio IDE).
198
- blocked_keywords = ["Error" , "error" , "Warning" , "warning" , "Failed" , "failed" , "[W " , "[E " , "Traceback" ]
197
+ # startup (e.g., log messages from Jupyter IDE, code-server IDE or RStudio IDE).
198
+ blocked_keywords = [
199
+ "Error" , "error" , "Warning" , "warning" , "Failed" , "failed" ,
200
+ "[W " , "[E " ,
201
+ # https://docs.nginx.com/nginx/admin-guide/monitoring/logging/
202
+ "[warn] " , "[error] " , "[crit] " , "[alert] " , "[emerg] " ,
203
+ # https://docs.python.org/3/tutorial/errors.html#exceptions
204
+ "Traceback" ,
205
+ ]
199
206
# Here is a list of allowed messages that match some block keyword from the list above, but we allow them
200
207
# for some reason.
201
208
allowed_messages = [
@@ -205,8 +212,8 @@ def grab_and_check_logs(subtests: pytest_subtests.SubTests, container: Workbench
205
212
"connect() failed (111: Connection refused) while connecting to upstream, client" ,
206
213
]
207
214
208
- # Let's wait couple of seconds to give a chance to log eventual extra startup messages just to be sure we don't
209
- # miss anytihng important in this test.
215
+ # Let's wait a couple of seconds to give a chance to log eventual extra startup messages just to be sure we don't
216
+ # miss anything important in this test.
210
217
time .sleep (3 )
211
218
212
219
stdout , stderr = container .get_logs ()
0 commit comments