Remove rust-analyzer smoke test

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra 2022-02-21 17:28:55 +01:00
parent aee479d615
commit af0ce62d3b
2 changed files with 1 additions and 69 deletions

View file

@ -34,11 +34,6 @@ jobs:
with:
clean: false
- name: Download rust-analyzer
run: |
script/download-rust-analyzer
echo "$PWD/vendor/bin" >> $GITHUB_PATH
- name: Run tests
run: cargo test --workspace --no-fail-fast
@ -74,9 +69,6 @@ jobs:
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
run: script/validate-version
- name: Download rust-analyzer
run: script/download-rust-analyzer
- name: Create app bundle
run: script/bundle

View file

@ -700,8 +700,6 @@ impl FakeLanguageServer {
mod tests {
use super::*;
use gpui::TestAppContext;
use unindent::Unindent;
use util::test::temp_tree;
#[ctor::ctor]
fn init_logger() {
@ -710,64 +708,6 @@ mod tests {
}
}
#[gpui::test]
async fn test_rust_analyzer(cx: TestAppContext) {
let lib_source = r#"
fn fun() {
let hello = "world";
}
"#
.unindent();
let root_dir = temp_tree(json!({
"Cargo.toml": r#"
[package]
name = "temp"
version = "0.1.0"
edition = "2018"
"#.unindent(),
"src": {
"lib.rs": &lib_source
}
}));
let lib_file_uri = Url::from_file_path(root_dir.path().join("src/lib.rs")).unwrap();
let server =
LanguageServer::new(Path::new("rust-analyzer"), root_dir.path(), cx.background())
.unwrap();
server.next_idle_notification().await;
server
.notify::<notification::DidOpenTextDocument>(DidOpenTextDocumentParams {
text_document: TextDocumentItem::new(
lib_file_uri.clone(),
"rust".to_string(),
0,
lib_source,
),
})
.await
.unwrap();
let hover = server
.request::<request::HoverRequest>(HoverParams {
text_document_position_params: TextDocumentPositionParams {
text_document: TextDocumentIdentifier::new(lib_file_uri),
position: Position::new(1, 21),
},
work_done_progress_params: Default::default(),
})
.await
.unwrap()
.unwrap();
assert_eq!(
hover.contents,
HoverContents::Markup(MarkupContent {
kind: MarkupKind::PlainText,
value: "&str".to_string()
})
);
}
#[gpui::test]
async fn test_fake(cx: TestAppContext) {
let (server, mut fake) = LanguageServer::fake(cx.background());