()
| 7126 | |
| 7127 | #[test] |
| 7128 | fn s3_workspace_backend_maps_to_rust_session_options() { |
| 7129 | pyo3::prepare_freethreaded_python(); |
| 7130 | let opts = Python::with_gil(|py| { |
| 7131 | let backend = Py::new( |
| 7132 | py, |
| 7133 | PyS3WorkspaceBackend { |
| 7134 | bucket: "workspace".to_string(), |
| 7135 | prefix: "users/u1/sessions/s1".to_string(), |
| 7136 | access_key_id: "AKIA".to_string(), |
| 7137 | secret_access_key: "secret".to_string(), |
| 7138 | endpoint: Some("https://minio.local:9000".to_string()), |
| 7139 | region: Some("us-east-1".to_string()), |
| 7140 | session_token: None, |
| 7141 | force_path_style: true, |
| 7142 | max_read_bytes: None, |
| 7143 | search_enabled: false, |
| 7144 | max_objects_scanned: None, |
| 7145 | max_grep_bytes_per_object: None, |
| 7146 | search_concurrency: None, |
| 7147 | }, |
| 7148 | ) |
| 7149 | .unwrap(); |
| 7150 | let mut session_options = PySessionOptions::new(); |
| 7151 | session_options.workspace_backend = Some(backend.into_any()); |
| 7152 | build_rust_session_options(session_options) |
| 7153 | }) |
| 7154 | .unwrap(); |
| 7155 | |
| 7156 | let services = opts.workspace_services.expect("s3 backend builds services"); |
| 7157 | let caps = services.capabilities(); |
| 7158 | assert!(caps.read); |
| 7159 | assert!(caps.write); |
| 7160 | assert!(!caps.exec); |
| 7161 | assert!(!caps.git); |
| 7162 | assert!(!caps.search); |
| 7163 | } |
| 7164 | |
| 7165 | #[test] |
| 7166 | fn s3_phase1_3_options_thread_through_to_core() { |
nothing calls this directly
no test coverage detected