File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -1114,6 +1114,16 @@ async def _replaced_revid(
11141114 assert revid == response_dict ["_cv" ] or revid == response_dict ["_rev" ]
11151115 return cast (dict , response )["_rev" ]
11161116
1117+
1118+ async def get_server_config (self ) -> dict [str , Any ]:
1119+ """
1120+ Gets the server-level configuration from the admin API.
1121+
1122+ Returns:
1123+ Dictionary containing the server configuration including logging settings
1124+ """
1125+ return await self ._send_request ("GET" , "/_config" )
1126+
11171127 async def delete_document (
11181128 self ,
11191129 doc_id : str ,
Original file line number Diff line number Diff line change @@ -77,7 +77,11 @@ async def test_log_redaction_partial(
7777 )
7878
7979 self .mark_test_step ("Fetch and scan SG logs for redaction violations" )
80- remote_log_path = "/home/ec2-user/log/sg_debug.log"
80+ server_config = await sg .get_server_config ()
81+ log_dir = server_config .get ("logging" , {}).get (
82+ "log_file_path" , "/home/ec2-user/log"
83+ )
84+ remote_log_path = f"{ log_dir } /sg_debug.log"
8185 try :
8286 log_contents = sg .fetch_log_file (remote_log_path , ssh_key_path )
8387 except Exception as e :
You can’t perform that action at this time.
0 commit comments