test(add): Remove expensive test

This is a carry-over from cargo-edit where we had to worry about the UX
of all of the behavior while now we are just relying on built-in cargo
behavior and don't need to test it specifically for `cargo add`.

On my machine, this test takes 11s.
This commit is contained in:
Ed Page 2023-05-26 12:56:22 -05:00
parent c412aa4fac
commit 0da6997ccc
6 changed files with 0 additions and 47 deletions

View file

@ -1 +0,0 @@
../add-basic.in

View file

@ -1,28 +0,0 @@
use cargo_test_support::compare::assert_ui;
use cargo_test_support::prelude::*;
use cargo_test_support::Project;
use cargo_test_support::curr_dir;
#[cargo_test]
fn case() {
cargo_test_support::registry::init();
let project = Project::from_template(curr_dir!().join("in"));
let project_root = project.root();
let cwd = &project_root;
let git_url = url::Url::from_directory_path(cwd.join("does-not-exist"))
.unwrap()
.to_string();
snapbox::cmd::Command::cargo_ui()
.arg("add")
.args(["fake-git", "--git", &git_url])
.current_dir(cwd)
.assert()
.code(101)
.stdout_matches_path(curr_dir!().join("stdout.log"))
.stderr_matches_path(curr_dir!().join("stderr.log"));
assert_ui().subset_matches(curr_dir!().join("out"), &project_root);
}

View file

@ -1,5 +0,0 @@
[workspace]
[package]
name = "cargo-list-test-fixture"
version = "0.0.0"

View file

@ -1,12 +0,0 @@
Updating git repository `[ROOTURL]/case/does-not-exist/`
...
error: failed to load source for dependency `fake-git`
Caused by:
Unable to update [ROOTURL]/case/does-not-exist/
Caused by:
failed to clone into: [ROOT]/home/.cargo/git/db/does-not-exist-[..]
Caused by:
...

View file

@ -36,7 +36,6 @@ mod git_rev;
mod git_tag;
mod infer_prerelease;
mod invalid_arg;
mod invalid_git_external;
mod invalid_git_name;
mod invalid_key_inherit_dependency;
mod invalid_key_overwrite_inherit_dependency;