MCPcopy Create free account
hub / github.com/cowprotocol/services / postgres_order_app_data

Function postgres_order_app_data

crates/database/src/orders.rs:2633–2658  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2631 #[tokio::test]
2632 #[ignore]
2633 async fn postgres_order_app_data() {
2634 let mut db = PgConnection::connect("postgresql://").await.unwrap();
2635 let mut db = db.begin().await.unwrap();
2636 crate::clear_DANGER_(&mut db).await.unwrap();
2637
2638 let order = Order {
2639 ..Default::default()
2640 };
2641 insert_order(&mut db, &order).await.unwrap();
2642 let full_order = single_full_order_with_quote(&mut db, &order.uid)
2643 .await
2644 .unwrap()
2645 .unwrap()
2646 .full_order;
2647 assert!(full_order.full_app_data.is_none());
2648 let full_app_data = vec![0u8, 1, 2];
2649 crate::app_data::insert(&mut db, &order.app_data, &full_app_data)
2650 .await
2651 .unwrap();
2652 let full_order = single_full_order_with_quote(&mut db, &order.uid)
2653 .await
2654 .unwrap()
2655 .unwrap()
2656 .full_order;
2657 assert_eq!(full_order.full_app_data, Some(full_app_data));
2658 }
2659
2660 #[tokio::test]
2661 #[ignore]

Callers

nothing calls this directly

Calls 6

clear_DANGER_Function · 0.85
unwrapMethod · 0.80
insert_orderFunction · 0.70
insertFunction · 0.70
connectFunction · 0.50

Tested by

no test coverage detected