diff options
author | Cyborus <cyborus@cyborus.xyz> | 2024-01-21 22:05:15 +0100 |
---|---|---|
committer | Cyborus <cyborus@cyborus.xyz> | 2024-01-21 22:05:15 +0100 |
commit | 26303fc1f8a22fa65f40c3ae440c727a6237e3c5 (patch) | |
tree | ebbdc9abde15a71b73be671a1f791d077df7cb56 /tests | |
parent | special-case `ssh_url` to not be a `url::Url` (diff) | |
download | forgejo-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.rs | 8 |
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 |