From 2e8f9e8043594c8e8ce57daabe4a26a8fb7e9826 Mon Sep 17 00:00:00 2001 From: Justin Wernick Date: Sat, 25 Mar 2023 21:44:51 +0200 Subject: Insist that git command paths are relative --- tests/server_shell.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/server_shell.rs b/tests/server_shell.rs index ea01791..721716b 100644 --- a/tests/server_shell.rs +++ b/tests/server_shell.rs @@ -166,7 +166,7 @@ fn clone_git_repo(c: &TestContext, path: &str) -> Assert { } fn clone_git_repo_relative_path(c: &TestContext, repo_name: &str) -> Assert { - clone_git_repo(c, &format!("/home/shukkie/git/shukkie/{}.git", repo_name)) + clone_git_repo(c, &format!("/~/git/shukkie/{}.git", repo_name)) } #[test] @@ -217,7 +217,7 @@ fn git_push_works() -> Result<()> { #[test] fn git_clone_can_not_target_repo_outside_allowed_paths() -> Result<()> { let c = spawn_ssh_server()?; - clone_git_repo(&c, "/home/shukkie/disallowed.git") + clone_git_repo(&c, "/~/disallowed.git") .failure() .stderr(predicates::str::contains("Path is not accessible")); @@ -227,7 +227,7 @@ fn git_clone_can_not_target_repo_outside_allowed_paths() -> Result<()> { #[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") + clone_git_repo(&c, "/~/disallowed-doesnt-exist.git") .failure() .stderr(predicates::str::contains("Path is not accessible")); -- cgit v1.2.3