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

Function postgres_order_app_data

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

Source from the content-addressed store, hash-verified

2440 #[tokio::test]
2441 #[ignore]
2442 async fn postgres_order_app_data() {
2443 let mut db = PgConnection::connect("postgresql://").await.unwrap();
2444 let mut db = db.begin().await.unwrap();
2445 crate::clear_DANGER_(&mut db).await.unwrap();
2446
2447 let order = Order {
2448 ..Default::default()
2449 };
2450 insert_order(&mut db, &order).await.unwrap();
2451 let full_order = single_full_order_with_quote(&mut db, &order.uid)
2452 .await
2453 .unwrap()
2454 .unwrap()
2455 .full_order;
2456 assert!(full_order.full_app_data.is_none());
2457 let full_app_data = vec![0u8, 1, 2];
2458 crate::app_data::insert(&mut db, &order.app_data, &full_app_data)
2459 .await
2460 .unwrap();
2461 let full_order = single_full_order_with_quote(&mut db, &order.uid)
2462 .await
2463 .unwrap()
2464 .unwrap()
2465 .full_order;
2466 assert_eq!(full_order.full_app_data, Some(full_app_data));
2467 }
2468
2469 #[tokio::test]
2470 #[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