MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_server_config_serialization_roundtrip

Function test_server_config_serialization_roundtrip

atomic-config/src/lib.rs:1665–1682  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1663
1664 #[test]
1665 fn test_server_config_serialization_roundtrip() {
1666 let config = ServerConfig {
1667 url: Some("https://atomic.storage".to_string()),
1668 default_org: Some("alice".to_string()),
1669 default_workspaces: BTreeMap::new(),
1670 identity: None,
1671 agent_identity: None,
1672 single_tenant: false,
1673 };
1674
1675 let toml_str = toml::to_string_pretty(&config).unwrap();
1676 assert!(toml_str.contains("url = \"https://atomic.storage\""));
1677 assert!(toml_str.contains("default_org = \"alice\""));
1678
1679 let parsed: ServerConfig = toml::from_str(&toml_str).unwrap();
1680 assert_eq!(parsed.url, config.url);
1681 assert_eq!(parsed.default_org, config.default_org);
1682 }
1683
1684 #[test]
1685 fn test_global_config_with_server() {

Callers

nothing calls this directly

Calls 1

unwrapMethod · 0.45

Tested by

no test coverage detected