test(add): implicit dir
This commit is contained in:
@@ -13,7 +13,6 @@ pub struct ClientTest {
|
||||
|
||||
impl ClientTest {
|
||||
pub fn new(id: String) -> Self {
|
||||
|
||||
// create a directory in /tmp with the given id
|
||||
let mut vol = String::from("/tmp/");
|
||||
vol.push_str(&id);
|
||||
@@ -56,6 +55,7 @@ impl ClientTest {
|
||||
pub fn run_cmd_ok(&mut self, args: &str) -> Output {
|
||||
let output = self.run_cmd(args);
|
||||
if !output.status.success() {
|
||||
println!("id: {}", self.test_id.clone());
|
||||
println!("Failed to execute: '{}'", args);
|
||||
println!("stderr: {}", String::from_utf8_lossy(&output.stderr));
|
||||
println!("stdout: {}", String::from_utf8_lossy(&output.stdout));
|
||||
|
||||
@@ -93,6 +93,7 @@ impl ServerTest {
|
||||
let full_path = self.volume.clone().join(file);
|
||||
|
||||
if !full_path.exists() {
|
||||
println!("id: {}", self.test_id.clone());
|
||||
eprintln!("File '{}' doesn't exists on the server", file);
|
||||
return false;
|
||||
}
|
||||
@@ -101,6 +102,7 @@ impl ServerTest {
|
||||
for line in BufReader::new(f).lines(){
|
||||
if let Ok(line) = line {
|
||||
if line != content {
|
||||
println!("id: {}", self.test_id.clone());
|
||||
eprintln!("File '{}' is not equal, {} != {}", file, line, content);
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user