From 556976890db34d28e48f71d7dc27112844b1080e Mon Sep 17 00:00:00 2001 From: bitfl0wer Date: Sat, 20 May 2023 12:22:54 +0200 Subject: [PATCH] Begin working on setup fn in tests/integration.rs --- tests/integration.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tests/integration.rs diff --git a/tests/integration.rs b/tests/integration.rs new file mode 100644 index 0000000..7b6841e --- /dev/null +++ b/tests/integration.rs @@ -0,0 +1,18 @@ +use chorus::{instance::Instance, limit::LimitedRequester, URLBundle}; + +struct TestBundle { + urls: URLBundle, + instance: Instance, +} + +async fn setup() -> TestBundle { + let urls = URLBundle::new( + "http://localhost:3001/api".to_string(), + "ws://localhost:3001".to_string(), + "http://localhost:3001".to_string(), + ); + let requester = LimitedRequester::new().await; + let instance = Instance::new(urls.clone(), requester).await.unwrap(); + + TestBundle { urls, instance } +}