Skip to content

Commit

Permalink
Constructors.
Browse files Browse the repository at this point in the history
  • Loading branch information
kwlzn committed Jun 9, 2018
1 parent 49274f0 commit e8f4bc2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/rust/engine/process_execution/src/local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ mod tests {
env: BTreeMap::new(),
input_files: fs::EMPTY_DIGEST,
output_files: BTreeSet::new(),
output_directories: BTreeSet::new(),
timeout: Duration::from_millis(1000),
description: "echo foo".to_string(),
});
Expand All @@ -184,6 +185,7 @@ mod tests {
env: BTreeMap::new(),
input_files: fs::EMPTY_DIGEST,
output_files: BTreeSet::new(),
output_directories: BTreeSet::new(),
timeout: Duration::from_millis(1000),
description: "echo foo and fail".to_string(),
});
Expand Down Expand Up @@ -211,6 +213,7 @@ mod tests {
env: env.clone(),
input_files: fs::EMPTY_DIGEST,
output_files: BTreeSet::new(),
output_directories: BTreeSet::new(),
timeout: Duration::from_millis(1000),
description: "run env".to_string(),
});
Expand Down Expand Up @@ -245,6 +248,7 @@ mod tests {
env: env,
input_files: fs::EMPTY_DIGEST,
output_files: BTreeSet::new(),
output_directories: BTreeSet::new(),
timeout: Duration::from_millis(1000),
description: "run env".to_string(),
}
Expand All @@ -263,6 +267,7 @@ mod tests {
env: BTreeMap::new(),
input_files: fs::EMPTY_DIGEST,
output_files: BTreeSet::new(),
output_directories: BTreeSet::new(),
timeout: Duration::from_millis(1000),
description: "echo foo".to_string(),
}).expect_err("Want Err");
Expand All @@ -279,6 +284,7 @@ mod tests {
env: BTreeMap::new(),
input_files: fs::EMPTY_DIGEST,
output_files: BTreeSet::new(),
output_directories: BTreeSet::new(),
timeout: Duration::from_millis(1000),
description: "bash".to_string(),
});
Expand All @@ -304,6 +310,7 @@ mod tests {
env: BTreeMap::new(),
input_files: fs::EMPTY_DIGEST,
output_files: vec![PathBuf::from("roland")].into_iter().collect(),
output_directories: BTreeSet::new(),
timeout: Duration::from_millis(1000),
description: "bash".to_string(),
});
Expand Down Expand Up @@ -336,6 +343,7 @@ mod tests {
output_files: vec![PathBuf::from("cats/roland"), PathBuf::from("treats")]
.into_iter()
.collect(),
output_directories: BTreeSet::new(),
timeout: Duration::from_millis(1000),
description: "treats-roland".to_string(),
});
Expand Down Expand Up @@ -366,6 +374,7 @@ mod tests {
env: BTreeMap::new(),
input_files: fs::EMPTY_DIGEST,
output_files: vec![PathBuf::from("roland")].into_iter().collect(),
output_directories: BTreeSet::new(),
timeout: Duration::from_millis(1000),
description: "echo foo".to_string(),
});
Expand Down Expand Up @@ -394,6 +403,7 @@ mod tests {
output_files: vec![PathBuf::from("roland"), PathBuf::from("susannah")]
.into_iter()
.collect(),
output_directories: BTreeSet::new(),
timeout: Duration::from_millis(1000),
description: "echo-roland".to_string(),
});
Expand Down
6 changes: 6 additions & 0 deletions src/rust/engine/process_execution/src/remote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,7 @@ mod tests {
.into_iter()
.map(|p| PathBuf::from(p))
.collect(),
output_directories: BTreeSet::new(),
timeout: Duration::from_millis(1000),
description: "some description".to_owned(),
};
Expand Down Expand Up @@ -707,6 +708,7 @@ mod tests {
env: BTreeMap::new(),
input_files: fs::EMPTY_DIGEST,
output_files: BTreeSet::new(),
output_directories: BTreeSet::new(),
timeout: Duration::from_millis(1000),
description: "wrong command".to_string(),
}).unwrap()
Expand Down Expand Up @@ -920,6 +922,7 @@ mod tests {
env: BTreeMap::new(),
input_files: fs::EMPTY_DIGEST,
output_files: BTreeSet::new(),
output_directories: BTreeSet::new(),
timeout: request_timeout,
description: "echo-a-foo".to_string(),
};
Expand Down Expand Up @@ -1539,6 +1542,7 @@ mod tests {
env: BTreeMap::new(),
input_files: fs::EMPTY_DIGEST,
output_files: BTreeSet::new(),
output_directories: BTreeSet::new(),
timeout: Duration::from_millis(5000),
description: "echo a foo".to_string(),
}
Expand Down Expand Up @@ -1715,6 +1719,7 @@ mod tests {
env: BTreeMap::new(),
input_files: TestDirectory::containing_roland().digest(),
output_files: BTreeSet::new(),
output_directories: BTreeSet::new(),
timeout: Duration::from_millis(1000),
description: "cat a roland".to_string(),
}
Expand All @@ -1726,6 +1731,7 @@ mod tests {
env: BTreeMap::new(),
input_files: fs::EMPTY_DIGEST,
output_files: BTreeSet::new(),
output_directories: BTreeSet::new(),
timeout: Duration::from_millis(1000),
description: "unleash a roaring meow".to_string(),
}
Expand Down
1 change: 1 addition & 0 deletions src/rust/engine/process_executor/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ fn main() {
env,
input_files,
output_files: BTreeSet::new(),
output_directories: BTreeSet::new(),
timeout: Duration::new(15 * 60, 0),
description: "process_executor".to_string(),
};
Expand Down

0 comments on commit e8f4bc2

Please sign in to comment.