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

Function gateway_to_json_includes_config_source

crates/openshell-cli/src/run.rs:8873–8890  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8871
8872 #[test]
8873 fn gateway_to_json_includes_config_source() {
8874 let gateway = ListedGateway {
8875 metadata: GatewayMetadata {
8876 name: "local-vm".to_string(),
8877 gateway_endpoint: "http://127.0.0.1:17670".to_string(),
8878 auth_mode: Some("plaintext".to_string()),
8879 ..Default::default()
8880 },
8881 source: GatewayMetadataSource::System,
8882 };
8883
8884 let json = gateway_to_json(&gateway, &Some("local-vm".to_string()));
8885
8886 assert_eq!(json["source"], "system");
8887 assert_eq!(json["type"], "local");
8888 assert_eq!(json["auth"], "plaintext");
8889 assert_eq!(json["active"], true);
8890 }
8891
8892 #[test]
8893 fn gateway_auth_label_defaults_https_gateways_to_mtls() {

Callers

nothing calls this directly

Calls 1

gateway_to_jsonFunction · 0.85

Tested by

no test coverage detected