MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / resolve_variable_metadata

Function resolve_variable_metadata

nodedb/src/control/security/auth_context.rs:392–401  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

390
391 #[test]
392 fn resolve_variable_metadata() {
393 let mut ctx = AuthContext::from_identity(&test_identity(), "s_test_003".into());
394 ctx.metadata.insert("plan".into(), "pro".into());
395
396 assert_eq!(
397 ctx.resolve_variable("metadata.plan"),
398 Some(serde_json::json!("pro"))
399 );
400 assert_eq!(ctx.resolve_variable("metadata.missing"), None);
401 }
402
403 #[test]
404 fn resolve_variable_unknown() {

Callers

nothing calls this directly

Calls 2

test_identityFunction · 0.70
insertMethod · 0.45

Tested by

no test coverage detected