LCOV - code coverage report
Current view: top level - libs/pageserver_api/src/config - tests.rs (source / functions) Coverage Total Hit
Test: 6fa910d1c9aea142e54ede6987809ef55544c500.info Lines: 100.0 % 19 19
Test Date: 2024-11-19 23:07:42 Functions: 100.0 % 1 1

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

Generated by: LCOV version 2.1-beta