From 9761556033c1faaae37f995ba557c47f9f3c357f Mon Sep 17 00:00:00 2001 From: Justin Wernick Date: Sat, 25 Mar 2023 12:35:11 +0200 Subject: Identify where the current code needs the dirs to exist --- tests/server_shell.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'tests') 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(()) } -- cgit v1.2.3