Reoganize remote client code to make room for non-ssh remote projects
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
This commit is contained in:
parent
84c243576f
commit
e0223add54
35 changed files with 1596 additions and 1579 deletions
|
@ -22,7 +22,7 @@ use project::{
|
|||
Project, ProjectPath,
|
||||
search::{SearchQuery, SearchResult},
|
||||
};
|
||||
use remote::SshRemoteClient;
|
||||
use remote::RemoteClient;
|
||||
use serde_json::json;
|
||||
use settings::{Settings, SettingsLocation, SettingsStore, initial_server_settings_content};
|
||||
use smol::stream::StreamExt;
|
||||
|
@ -1119,7 +1119,7 @@ async fn test_reconnect(cx: &mut TestAppContext, server_cx: &mut TestAppContext)
|
|||
buffer.edit([(ix..ix + 1, "100")], None, cx);
|
||||
});
|
||||
|
||||
let client = cx.read(|cx| project.read(cx).ssh_client().unwrap());
|
||||
let client = cx.read(|cx| project.read(cx).remote_client().unwrap());
|
||||
client
|
||||
.update(cx, |client, cx| client.simulate_disconnect(cx))
|
||||
.detach();
|
||||
|
@ -1782,7 +1782,7 @@ pub async fn init_test(
|
|||
});
|
||||
init_logger();
|
||||
|
||||
let (opts, ssh_server_client) = SshRemoteClient::fake_server(cx, server_cx);
|
||||
let (opts, ssh_server_client) = RemoteClient::fake_server(cx, server_cx);
|
||||
let http_client = Arc::new(BlockedHttpClient);
|
||||
let node_runtime = NodeRuntime::unavailable();
|
||||
let languages = Arc::new(LanguageRegistry::new(cx.executor()));
|
||||
|
@ -1804,7 +1804,7 @@ pub async fn init_test(
|
|||
)
|
||||
});
|
||||
|
||||
let ssh = SshRemoteClient::fake_client(opts, cx).await;
|
||||
let ssh = RemoteClient::fake_client(opts, cx).await;
|
||||
let project = build_project(ssh, cx);
|
||||
project
|
||||
.update(cx, {
|
||||
|
@ -1819,7 +1819,7 @@ fn init_logger() {
|
|||
zlog::init_test();
|
||||
}
|
||||
|
||||
fn build_project(ssh: Entity<SshRemoteClient>, cx: &mut TestAppContext) -> Entity<Project> {
|
||||
fn build_project(ssh: Entity<RemoteClient>, cx: &mut TestAppContext) -> Entity<Project> {
|
||||
cx.update(|cx| {
|
||||
if !cx.has_global::<SettingsStore>() {
|
||||
let settings_store = SettingsStore::test(cx);
|
||||
|
@ -1845,5 +1845,5 @@ fn build_project(ssh: Entity<SshRemoteClient>, cx: &mut TestAppContext) -> Entit
|
|||
language::init(cx);
|
||||
});
|
||||
|
||||
cx.update(|cx| Project::ssh(ssh, client, node, user_store, languages, fs, cx))
|
||||
cx.update(|cx| Project::remote(ssh, client, node, user_store, languages, fs, cx))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue