Skip to content

Commit

Permalink
Make ci happy
Browse files Browse the repository at this point in the history
  • Loading branch information
Knight authored and Knight committed Jun 15, 2016
1 parent 98b7286 commit 6ff67a2
Showing 1 changed file with 27 additions and 26 deletions.
53 changes: 27 additions & 26 deletions src/rustup-dist/tests/transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ extern crate tempdir;

use rustup_dist::prefix::InstallPrefix;
use rustup_dist::component::Transaction;
use rustup_dist::dist::DEFAULT_DIST_SERVER;
use rustup_dist::temp;
use rustup_dist::Notification;
use rustup_dist::ErrorKind;
use rustup_utils::utils;
use rustup_utils::raw as utils_raw;
use rustup_dist::ErrorKind;
use tempdir::TempDir;
use std::fs;
use std::io::Write;
Expand All @@ -21,7 +22,7 @@ fn add_file() {

let prefix = InstallPrefix::from(prefixdir.path().to_owned());

let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), Box::new(|_| ()));
let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), DEFAULT_DIST_SERVER, Box::new(|_| ()));

let notify = |_: Notification| ();
let mut tx = Transaction::new(prefix.clone(), &tmpcfg, &notify);
Expand All @@ -43,7 +44,7 @@ fn add_file_then_rollback() {

let prefix = InstallPrefix::from(prefixdir.path().to_owned());

let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), Box::new(|_| ()));
let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), DEFAULT_DIST_SERVER, Box::new(|_| ()));

let notify = |_: Notification| ();
let mut tx = Transaction::new(prefix.clone(), &tmpcfg, &notify);
Expand All @@ -59,7 +60,7 @@ fn add_file_that_exists() {
let prefixdir = TempDir::new("multirust").unwrap();
let txdir = TempDir::new("multirust").unwrap();

let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), Box::new(|_| ()));
let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), DEFAULT_DIST_SERVER, Box::new(|_| ()));

let prefix = InstallPrefix::from(prefixdir.path().to_owned());

Expand All @@ -86,7 +87,7 @@ fn copy_file() {
let prefixdir = TempDir::new("multirust").unwrap();
let txdir = TempDir::new("multirust").unwrap();

let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), Box::new(|_| ()));
let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), DEFAULT_DIST_SERVER, Box::new(|_| ()));

let prefix = InstallPrefix::from(prefixdir.path().to_owned());

Expand All @@ -108,7 +109,7 @@ fn copy_file_then_rollback() {
let prefixdir = TempDir::new("multirust").unwrap();
let txdir = TempDir::new("multirust").unwrap();

let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), Box::new(|_| ()));
let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), DEFAULT_DIST_SERVER, Box::new(|_| ()));

let prefix = InstallPrefix::from(prefixdir.path().to_owned());

Expand All @@ -130,7 +131,7 @@ fn copy_file_that_exists() {
let prefixdir = TempDir::new("multirust").unwrap();
let txdir = TempDir::new("multirust").unwrap();

let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), Box::new(|_| ()));
let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), DEFAULT_DIST_SERVER, Box::new(|_| ()));

let prefix = InstallPrefix::from(prefixdir.path().to_owned());

Expand Down Expand Up @@ -160,7 +161,7 @@ fn copy_dir() {
let prefixdir = TempDir::new("multirust").unwrap();
let txdir = TempDir::new("multirust").unwrap();

let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), Box::new(|_| ()));
let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), DEFAULT_DIST_SERVER, Box::new(|_| ()));

let prefix = InstallPrefix::from(prefixdir.path().to_owned());

Expand Down Expand Up @@ -190,7 +191,7 @@ fn copy_dir_then_rollback() {
let prefixdir = TempDir::new("multirust").unwrap();
let txdir = TempDir::new("multirust").unwrap();

let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), Box::new(|_| ()));
let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), DEFAULT_DIST_SERVER, Box::new(|_| ()));

let prefix = InstallPrefix::from(prefixdir.path().to_owned());

Expand Down Expand Up @@ -220,7 +221,7 @@ fn copy_dir_that_exists() {
let prefixdir = TempDir::new("multirust").unwrap();
let txdir = TempDir::new("multirust").unwrap();

let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), Box::new(|_| ()));
let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), DEFAULT_DIST_SERVER, Box::new(|_| ()));

let prefix = InstallPrefix::from(prefixdir.path().to_owned());

Expand All @@ -245,7 +246,7 @@ fn remove_file() {
let prefixdir = TempDir::new("multirust").unwrap();
let txdir = TempDir::new("multirust").unwrap();

let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), Box::new(|_| ()));
let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), DEFAULT_DIST_SERVER, Box::new(|_| ()));

let prefix = InstallPrefix::from(prefixdir.path().to_owned());

Expand All @@ -266,7 +267,7 @@ fn remove_file_then_rollback() {
let prefixdir = TempDir::new("multirust").unwrap();
let txdir = TempDir::new("multirust").unwrap();

let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), Box::new(|_| ()));
let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), DEFAULT_DIST_SERVER, Box::new(|_| ()));

let prefix = InstallPrefix::from(prefixdir.path().to_owned());

Expand All @@ -287,7 +288,7 @@ fn remove_file_that_not_exists() {
let prefixdir = TempDir::new("multirust").unwrap();
let txdir = TempDir::new("multirust").unwrap();

let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), Box::new(|_| ()));
let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), DEFAULT_DIST_SERVER, Box::new(|_| ()));

let prefix = InstallPrefix::from(prefixdir.path().to_owned());

Expand All @@ -310,7 +311,7 @@ fn remove_dir() {
let prefixdir = TempDir::new("multirust").unwrap();
let txdir = TempDir::new("multirust").unwrap();

let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), Box::new(|_| ()));
let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), DEFAULT_DIST_SERVER, Box::new(|_| ()));

let prefix = InstallPrefix::from(prefixdir.path().to_owned());

Expand All @@ -332,7 +333,7 @@ fn remove_dir_then_rollback() {
let prefixdir = TempDir::new("multirust").unwrap();
let txdir = TempDir::new("multirust").unwrap();

let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), Box::new(|_| ()));
let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), DEFAULT_DIST_SERVER, Box::new(|_| ()));

let prefix = InstallPrefix::from(prefixdir.path().to_owned());

Expand All @@ -354,7 +355,7 @@ fn remove_dir_that_not_exists() {
let prefixdir = TempDir::new("multirust").unwrap();
let txdir = TempDir::new("multirust").unwrap();

let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), Box::new(|_| ()));
let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), DEFAULT_DIST_SERVER, Box::new(|_| ()));

let prefix = InstallPrefix::from(prefixdir.path().to_owned());

Expand All @@ -377,7 +378,7 @@ fn write_file() {
let prefixdir = TempDir::new("multirust").unwrap();
let txdir = TempDir::new("multirust").unwrap();

let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), Box::new(|_| ()));
let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), DEFAULT_DIST_SERVER, Box::new(|_| ()));

let prefix = InstallPrefix::from(prefixdir.path().to_owned());

Expand All @@ -399,7 +400,7 @@ fn write_file_then_rollback() {
let prefixdir = TempDir::new("multirust").unwrap();
let txdir = TempDir::new("multirust").unwrap();

let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), Box::new(|_| ()));
let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), DEFAULT_DIST_SERVER, Box::new(|_| ()));

let prefix = InstallPrefix::from(prefixdir.path().to_owned());

Expand All @@ -418,7 +419,7 @@ fn write_file_that_exists() {
let prefixdir = TempDir::new("multirust").unwrap();
let txdir = TempDir::new("multirust").unwrap();

let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), Box::new(|_| ()));
let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), DEFAULT_DIST_SERVER, Box::new(|_| ()));

let prefix = InstallPrefix::from(prefixdir.path().to_owned());

Expand All @@ -445,7 +446,7 @@ fn modify_file_that_not_exists() {
let prefixdir = TempDir::new("multirust").unwrap();
let txdir = TempDir::new("multirust").unwrap();

let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), Box::new(|_| ()));
let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), DEFAULT_DIST_SERVER, Box::new(|_| ()));

let prefix = InstallPrefix::from(prefixdir.path().to_owned());

Expand All @@ -465,7 +466,7 @@ fn modify_file_that_exists() {
let prefixdir = TempDir::new("multirust").unwrap();
let txdir = TempDir::new("multirust").unwrap();

let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), Box::new(|_| ()));
let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), DEFAULT_DIST_SERVER, Box::new(|_| ()));

let prefix = InstallPrefix::from(prefixdir.path().to_owned());

Expand All @@ -485,7 +486,7 @@ fn modify_file_that_not_exists_then_rollback() {
let prefixdir = TempDir::new("multirust").unwrap();
let txdir = TempDir::new("multirust").unwrap();

let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), Box::new(|_| ()));
let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), DEFAULT_DIST_SERVER, Box::new(|_| ()));

let prefix = InstallPrefix::from(prefixdir.path().to_owned());

Expand All @@ -503,7 +504,7 @@ fn modify_file_that_exists_then_rollback() {
let prefixdir = TempDir::new("multirust").unwrap();
let txdir = TempDir::new("multirust").unwrap();

let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), Box::new(|_| ()));
let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), DEFAULT_DIST_SERVER, Box::new(|_| ()));

let prefix = InstallPrefix::from(prefixdir.path().to_owned());

Expand All @@ -526,7 +527,7 @@ fn modify_twice_then_rollback() {
let prefixdir = TempDir::new("multirust").unwrap();
let txdir = TempDir::new("multirust").unwrap();

let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), Box::new(|_| ()));
let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), DEFAULT_DIST_SERVER, Box::new(|_| ()));

let prefix = InstallPrefix::from(prefixdir.path().to_owned());

Expand All @@ -549,7 +550,7 @@ fn do_multiple_op_transaction(rollback: bool) {
let prefixdir = TempDir::new("multirust").unwrap();
let txdir = TempDir::new("multirust").unwrap();

let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), Box::new(|_| ()));
let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), DEFAULT_DIST_SERVER, Box::new(|_| ()));

let prefix = InstallPrefix::from(prefixdir.path().to_owned());

Expand Down Expand Up @@ -645,7 +646,7 @@ fn rollback_failure_keeps_going() {
let prefixdir = TempDir::new("multirust").unwrap();
let txdir = TempDir::new("multirust").unwrap();

let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), Box::new(|_| ()));
let tmpcfg = temp::Cfg::new(txdir.path().to_owned(), DEFAULT_DIST_SERVER, Box::new(|_| ()));

let prefix = InstallPrefix::from(prefixdir.path().to_owned());

Expand Down

0 comments on commit 6ff67a2

Please sign in to comment.