MCPcopy Create free account
hub / github.com/apache/paimon-rust / test_extract_prefix_map

Function test_extract_prefix_map

crates/paimon/src/api/rest_util.rs:85–97  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

83
84 #[test]
85 fn test_extract_prefix_map() {
86 let mut options = Options::new();
87 options.set("header.Content-Type", "application/json");
88 options.set("header.Authorization", "Bearer token");
89 options.set("other.key", "value");
90
91 let headers = RESTUtil::extract_prefix_map(&options, "header.");
92 assert_eq!(headers.len(), 2);
93 assert_eq!(
94 headers.get("Content-Type"),
95 Some(&"application/json".to_string())
96 );
97 }
98}

Callers

nothing calls this directly

Calls 1

setMethod · 0.80

Tested by

no test coverage detected