()
| 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() { |
nothing calls this directly
no test coverage detected