MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / isolated_gateway_add_env

Function isolated_gateway_add_env

crates/openshell-cli/tests/mtls_integration.rs:526–542  ·  view source on GitHub ↗
(
    config_dir: &std::path::Path,
    state_dir: &std::path::Path,
)

Source from the content-addressed store, hash-verified

524}
525
526fn isolated_gateway_add_env(
527 config_dir: &std::path::Path,
528 state_dir: &std::path::Path,
529) -> EnvVarGuard {
530 let xdg_config = config_dir.to_string_lossy().into_owned();
531 let xdg_state = state_dir.to_string_lossy().into_owned();
532 let local_tls_dir = state_dir.join("no-package-managed-tls");
533 let local_tls = local_tls_dir.to_string_lossy().into_owned();
534
535 EnvVarGuard::set(&[
536 ("XDG_CONFIG_HOME", xdg_config.as_str()),
537 ("XDG_STATE_HOME", xdg_state.as_str()),
538 ("HOME", xdg_state.as_str()),
539 ("OPENSHELL_LOCAL_TLS_DIR", local_tls.as_str()),
540 ("OPENSHELL_GATEWAY", "unused-by-named-gateway-add"),
541 ])
542}
543
544#[tokio::test]
545async fn gateway_add_mtls_loopback_uses_explicit_gateway_name() {

Calls 1

as_strMethod · 0.45

Tested by

no test coverage detected