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