diff --git a/Cargo.lock b/Cargo.lock index 2d25f79fe2..f853a2059c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1040,6 +1040,7 @@ dependencies = [ "prometheus", "rand 0.8.5", "reqwest", + "room", "rpc", "scrypt", "serde", diff --git a/crates/collab/Cargo.toml b/crates/collab/Cargo.toml index 9b3603e6e4..8603f67557 100644 --- a/crates/collab/Cargo.toml +++ b/crates/collab/Cargo.toml @@ -55,13 +55,14 @@ features = ["runtime-tokio-rustls", "postgres", "time", "uuid"] [dev-dependencies] collections = { path = "../collections", features = ["test-support"] } gpui = { path = "../gpui", features = ["test-support"] } -rpc = { path = "../rpc", features = ["test-support"] } client = { path = "../client", features = ["test-support"] } editor = { path = "../editor", features = ["test-support"] } language = { path = "../language", features = ["test-support"] } log = { version = "0.4.16", features = ["kv_unstable_serde"] } lsp = { path = "../lsp", features = ["test-support"] } project = { path = "../project", features = ["test-support"] } +room = { path = "../room", features = ["test-support"] } +rpc = { path = "../rpc", features = ["test-support"] } settings = { path = "../settings", features = ["test-support"] } theme = { path = "../theme" } workspace = { path = "../workspace", features = ["test-support"] } diff --git a/crates/collab/src/integration_tests.rs b/crates/collab/src/integration_tests.rs index c91e3e4ea5..36ecaf41b4 100644 --- a/crates/collab/src/integration_tests.rs +++ b/crates/collab/src/integration_tests.rs @@ -90,10 +90,15 @@ async fn test_share_project_in_room( ) .await; + let room_a = Room::create(client_a.clone()).await.unwrap(); let (project_a, worktree_id) = client_a.build_local_project("/a", cx_a).await; - let project_id = project_a.update(cx_a, |project, cx| project.share(cx)).await.unwrap(); - + // room.publish_project(project_a.clone()).await.unwrap(); + let incoming_calls_b = client_b.user_store.incoming_calls(); + let user_b_joined = room_a.invite(client_b.user_id().unwrap()); + let call_b = incoming_calls_b.next().await.unwrap(); + let room_b = Room::join(call_b.room_id, client_b.clone()).await.unwrap(); + user_b_joined.await.unwrap(); } #[gpui::test(iterations = 10)] @@ -5469,9 +5474,6 @@ impl TestClient { worktree .read_with(cx, |tree, _| tree.as_local().unwrap().scan_complete()) .await; - project - .update(cx, |project, _| project.next_remote_id()) - .await; (project, worktree.read_with(cx, |tree, _| tree.id())) } diff --git a/crates/room/src/room.rs b/crates/room/src/room.rs index e4017e9642..965804efc8 100644 --- a/crates/room/src/room.rs +++ b/crates/room/src/room.rs @@ -35,11 +35,11 @@ impl Room { todo!() } - pub async fn share_project(&mut self, project: ModelHandle) -> Result<()> { + pub async fn publish_project(&mut self, project: ModelHandle) -> Result<()> { todo!() } - pub async fn unshare_project(&mut self, project: ModelHandle) -> Result<()> { + pub async fn unpublish_project(&mut self, project: ModelHandle) -> Result<()> { todo!() }