LCOV - code coverage report
Current view: top level - libs/pageserver_api/src/config - tests.rs (source / functions) Coverage Total Hit
Test: 75747cdbffeb0b6d2a2a311584368de68cd9aadc.info Lines: 100.0 % 19 19
Test Date: 2024-06-24 06:52:57 Functions: 100.0 % 1 1

            Line data    Source code
       1              : use super::*;
       2              : 
       3              : #[test]
       4            2 : fn test_node_metadata_v1_backward_compatibilty() {
       5            2 :     let v1 = serde_json::to_vec(&serde_json::json!({
       6            2 :         "host": "localhost",
       7            2 :         "port": 23,
       8            2 :         "http_host": "localhost",
       9            2 :         "http_port": 42,
      10            2 :     }));
      11            2 : 
      12            2 :     assert_eq!(
      13            2 :         serde_json::from_slice::<NodeMetadata>(&v1.unwrap()).unwrap(),
      14            2 :         NodeMetadata {
      15            2 :             postgres_host: "localhost".to_string(),
      16            2 :             postgres_port: 23,
      17            2 :             http_host: "localhost".to_string(),
      18            2 :             http_port: 42,
      19            2 :             other: HashMap::new(),
      20            2 :         }
      21            2 :     )
      22            2 : }
        

Generated by: LCOV version 2.1-beta