LCOV - code coverage report
Current view: top level - libs/pageserver_api/src/config - tests.rs (source / functions) Coverage Total Hit
Test: 2aa98e37cd3250b9a68c97ef6050b16fe702ab33.info Lines: 100.0 % 19 19
Test Date: 2024-08-29 11:33:10 Functions: 100.0 % 1 1

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

Generated by: LCOV version 2.1-beta