summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorCyborus <cyborus@cyborus.xyz>2024-01-21 22:05:15 +0100
committerCyborus <cyborus@cyborus.xyz>2024-01-21 22:05:15 +0100
commit26303fc1f8a22fa65f40c3ae440c727a6237e3c5 (patch)
treeebbdc9abde15a71b73be671a1f791d077df7cb56 /tests
parentspecial-case `ssh_url` to not be a `url::Url` (diff)
downloadforgejo-api-26303fc1f8a22fa65f40c3ae440c727a6237e3c5.tar.xz
forgejo-api-26303fc1f8a22fa65f40c3ae440c727a6237e3c5.zip
put test repo in current dir instead of root
Diffstat (limited to 'tests')
-rw-r--r--tests/ci_test.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/ci_test.rs b/tests/ci_test.rs
index 76c914e..b5d3706 100644
--- a/tests/ci_test.rs
+++ b/tests/ci_test.rs
@@ -65,10 +65,10 @@ async fn user() {
async fn repo() {
let api = get_api();
- tokio::fs::create_dir("/test_repo").await.unwrap();
+ tokio::fs::create_dir("./test_repo").await.unwrap();
let git = || {
let mut cmd = std::process::Command::new("git");
- cmd.current_dir("/test_repo");
+ cmd.current_dir("./test_repo");
cmd
};
let _ = git()
@@ -84,7 +84,7 @@ async fn repo() {
.args(["config", "user.email", "admin@noreply.example.org"])
.status()
.unwrap();
- tokio::fs::write("/test_repo/README.md", "# Test\nThis is a test repo")
+ tokio::fs::write("./test_repo/README.md", "# Test\nThis is a test repo")
.await
.unwrap();
let _ = git().args(["add", "."]).status().unwrap();
@@ -135,7 +135,7 @@ async fn repo() {
let _ = git().args(["switch", "-c", "test"]).status().unwrap();
tokio::fs::write(
- "/test_repo/example.rs",
+ "./test_repo/example.rs",
"fn add_one(x: u32) -> u32 { x + 1 }",
)
.await