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

Function postgres_order_app_data

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

Source from the content-addressed store, hash-verified

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