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

Function apply_auth_uses_stored_token

crates/openshell-cli/src/main.rs:3716–3731  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3714
3715 #[test]
3716 fn apply_auth_uses_stored_token() {
3717 let tmp = tempfile::tempdir().unwrap();
3718 with_tmp_xdg(tmp.path(), || {
3719 store_gateway_metadata(
3720 "edge-gateway",
3721 &edge_metadata("edge-gateway", "https://gw.example.com"),
3722 )
3723 .unwrap();
3724 store_edge_token("edge-gateway", "token-123").unwrap();
3725
3726 let mut tls = TlsOptions::default();
3727 apply_auth(&mut tls, "edge-gateway");
3728
3729 assert_eq!(tls.edge_token.as_deref(), Some("token-123"));
3730 });
3731 }
3732
3733 /// Verify the flag names the TUI uses to build its `ProxyCommand` are
3734 /// accepted by the `SshProxy` subcommand and land in the right fields.

Callers

nothing calls this directly

Calls 6

store_gateway_metadataFunction · 0.85
edge_metadataFunction · 0.85
store_edge_tokenFunction · 0.85
apply_authFunction · 0.85
pathMethod · 0.80
with_tmp_xdgFunction · 0.70

Tested by

no test coverage detected