summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJustin Wernick <justin@worthe-it.co.za>2023-03-25 12:35:11 +0200
committerJustin Wernick <justin@worthe-it.co.za>2023-03-25 12:35:11 +0200
commit9761556033c1faaae37f995ba557c47f9f3c357f (patch)
tree5c6eae9e6a20e052d95cb4d112ee9098ea96ae2b /tests
parent8b21be5e14f44c4f9b0d995ed73709bdde30028f (diff)
Identify where the current code needs the dirs to exist
Diffstat (limited to 'tests')
-rw-r--r--tests/server_shell.rs12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/server_shell.rs b/tests/server_shell.rs
index 756c5a8..ea01791 100644
--- a/tests/server_shell.rs
+++ b/tests/server_shell.rs
@@ -219,7 +219,17 @@ fn git_clone_can_not_target_repo_outside_allowed_paths() -> Result<()> {
let c = spawn_ssh_server()?;
clone_git_repo(&c, "/home/shukkie/disallowed.git")
.failure()
- .stdout("Path is not accessible");
+ .stderr(predicates::str::contains("Path is not accessible"));
+
+ Ok(())
+}
+
+#[test]
+fn git_clone_can_not_target_repo_outside_allowed_paths_where_path_doesnt_exist() -> Result<()> {
+ let c = spawn_ssh_server()?;
+ clone_git_repo(&c, "/home/shukkie/disallowed-doesnt-exist.git")
+ .failure()
+ .stderr(predicates::str::contains("Path is not accessible"));
Ok(())
}