From 0bcb54ba45a2744b87b71061d73f791e98de4403 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Mon, 18 Jul 2022 09:02:32 +0200 Subject: repository: Fix test writing into Gitaly's repository One of our tests for `clnoeFromURLCommand()` tries to clone into a subdirectory of the Gitaly repository itself. This is wrong: all test data should always end up in a temporary directory. Fix this by properly cloning into a temporary directory. --- internal/gitaly/service/repository/create_repository_from_url_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/gitaly/service/repository/create_repository_from_url_test.go b/internal/gitaly/service/repository/create_repository_from_url_test.go index 5fdd93ccb..c88e6c2f9 100644 --- a/internal/gitaly/service/repository/create_repository_from_url_test.go +++ b/internal/gitaly/service/repository/create_repository_from_url_test.go @@ -260,7 +260,7 @@ func TestServer_CloneFromURLCommand_withMirror(t *testing.T) { t.Parallel() ctx := testhelper.Context(t) - repositoryFullPath := "full/path/to/repository" + repositoryFullPath := filepath.Join(testhelper.TempDir(t), "full/path/to/repository") url := "https://www.example.com/secretrepo.git" cfg := testcfg.Build(t) -- cgit v1.2.3