Skip to content

Commit

Permalink
Remove test update_removes_components_that_dont_exist
Browse files Browse the repository at this point in the history
Historically, this test was added before the check that aborts update on missing
components (which is tested by the new test in the previous commit, as well as
elsewhere), so I think this test was only testing a bug.
  • Loading branch information
nrc committed Jan 11, 2018
1 parent 514984b commit 28dd69d
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions src/rustup-dist/tests/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -519,28 +519,6 @@ fn upgrade() {
});
}

#[test]
fn update_removes_components_that_dont_exist() {
// On day 1 install the 'bonus' component, on day 2 its no londer a component
let edit = &|date: &str, pkg: &mut MockPackage| {
if date == "2016-02-01" {
let mut tpkg = pkg.targets.iter_mut().find(|p| p.target == "x86_64-apple-darwin").unwrap();
tpkg.components.push(MockComponent {
name: "bonus".to_string(),
target: "x86_64-apple-darwin".to_string(),
});
}
};
setup(Some(edit), false, &|url, toolchain, prefix, download_cfg, temp_cfg| {
change_channel_date(url, "nightly", "2016-02-01");
update_from_dist(url, toolchain, prefix, &[], &[], download_cfg, temp_cfg).unwrap();
assert!(utils::path_exists(&prefix.path().join("bin/bonus")));
change_channel_date(url, "nightly", "2016-02-02");
update_from_dist(url, toolchain, prefix, &[], &[], download_cfg, temp_cfg).unwrap();
assert!(!utils::path_exists(&prefix.path().join("bin/bonus")));
});
}

#[test]
fn update_preserves_extensions() {
setup(None, false, &|url, toolchain, prefix, download_cfg, temp_cfg| {
Expand Down

0 comments on commit 28dd69d

Please sign in to comment.