MCPcopy Create free account
hub / github.com/TankHQ/tank / postgres

Function postgres

tank-postgres/tests/postgres.rs:16–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14
15 #[tokio::test]
16 pub async fn postgres() {
17 init_logs();
18 let _guard = MUTEX.lock().unwrap();
19
20 // Unencrypted
21 let (url, container) = init(false).await;
22 let container = container.expect("Could not launch the container");
23 let mut pool = DRIVER
24 .connect_pool(url.into(), PoolConfig::new())
25 .await
26 .expect("Failed to connect");
27 execute_tests(&mut pool).await;
28 drop(container);
29
30 // SSL
31 let (url, container) = init(true).await;
32 let container = container.expect("Could not launch the SSL container");
33 let mut pool = DRIVER
34 .connect_pool(url.into(), PoolConfig::new())
35 .await
36 .expect("Failed to connect");
37 execute_tests(&mut pool).await;
38 drop(container);
39 }
40
41 #[tokio::test]
42 async fn wrong_url() {

Callers

nothing calls this directly

Calls 4

init_logsFunction · 0.85
connect_poolMethod · 0.80
initFunction · 0.70
execute_testsFunction · 0.50

Tested by

no test coverage detected