mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-14 08:52:56 +00:00
Fix passing storage JWT token to the communicator process
Makes the 'test_compute_auth_to_pageserver' test pass
This commit is contained in:
@@ -30,7 +30,14 @@ pub extern "C" fn communicator_worker_process_launch(
|
||||
// Convert the arguments into more convenient Rust types
|
||||
let tenant_id = unsafe { CStr::from_ptr(tenant_id) }.to_str().unwrap();
|
||||
let timeline_id = unsafe { CStr::from_ptr(timeline_id) }.to_str().unwrap();
|
||||
let auth_token = unsafe { auth_token.as_ref() }.map(|s| s.to_string());
|
||||
let auth_token = {
|
||||
let token_str = unsafe { CStr::from_ptr(auth_token) }.to_str().unwrap();
|
||||
if token_str == "" {
|
||||
None
|
||||
} else {
|
||||
Some(token_str.to_string())
|
||||
}
|
||||
};
|
||||
let file_cache_path = {
|
||||
if file_cache_path.is_null() {
|
||||
None
|
||||
|
||||
Reference in New Issue
Block a user