Skip to content

Commit 6bcabd9

Browse files
committed
fix up comment
1 parent 6bb964b commit 6bcabd9

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

dropshot/src/logging.rs

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -357,11 +357,11 @@ mod test {
357357

358358
/**
359359
* Records that the caller intends to create a directory with relative
360-
* path "path" underneath the root directory for this log test. Returns
361-
* a String representing the path to this directory. This directory
362-
* will be removed during teardown. Directories and files must be
363-
* recorded in the order they would be created so that the order can be
364-
* reversed at teardown (without needing any kind of recursive removal).
360+
* path "path" underneath the root directory for this log test. Returns
361+
* the path to this directory. This directory will be removed during
362+
* teardown. Directories and files must be recorded in the order they
363+
* would be created so that the order can be reversed at teardown
364+
* (without needing any kind of recursive removal).
365365
*/
366366
fn will_create_dir(&mut self, path: &str) -> PathBuf {
367367
let mut pathbuf = self.directory.clone();
@@ -428,6 +428,10 @@ mod test {
428428
);
429429

430430
assert!(result.is_err());
431+
assert!(result.unwrap_err().to_string().starts_with(&format!(
432+
"open log file \"{}\": Is a directory",
433+
&path.display()
434+
)));
431435
}
432436

433437
#[test]
@@ -452,6 +456,10 @@ mod test {
452456
);
453457

454458
assert!(result.is_err());
459+
assert!(result.unwrap_err().to_string().starts_with(&format!(
460+
"open log file \"{}\": File exists",
461+
&path
462+
)));
455463
}
456464

457465
/*

0 commit comments

Comments
 (0)