LCOV - code coverage report
Current view: top level - libs/pageserver_api/src/config - tests.rs (source / functions) Coverage Total Hit
Test: 20b6afc7b7f34578dcaab2b3acdaecfe91cd8bf1.info Lines: 100.0 % 19 19
Test Date: 2024-11-25 17:48:16 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