summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJustin Wernick <justin@worthe-it.co.za>2023-03-25 21:44:51 +0200
committerJustin Wernick <justin@worthe-it.co.za>2023-03-25 21:46:12 +0200
commit2e8f9e8043594c8e8ce57daabe4a26a8fb7e9826 (patch)
tree2d4931fa07e31c4a6de023e1c6b47398b05cc823 /tests
parent9761556033c1faaae37f995ba557c47f9f3c357f (diff)
Insist that git command paths are relative
Diffstat (limited to 'tests')
-rw-r--r--tests/server_shell.rs6
1 files changed, 3 insertions, 3 deletions
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"));