Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2023-03-14 14:31:21 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2023-03-16 18:38:14 +0300
commit559ce61fd44cf2e6e1e6dbbcfa4f01b87d911a80 (patch)
tree9528a9d83f8a20c441e68d3227f5f8178a362c2d
parent2e300a36d84e079231e4aac2dc6ef6264c6c704b (diff)
repository: Stop using seed repositories for CreateFork
Two of the Createfork tests are still using seeded repositories even though they don't really depend on any of their data. Convert the tests to use unseeded repositories so that we can start testing with the SHA256 object format.
-rw-r--r--internal/gitaly/service/repository/create_fork_test.go15
1 files changed, 8 insertions, 7 deletions
diff --git a/internal/gitaly/service/repository/create_fork_test.go b/internal/gitaly/service/repository/create_fork_test.go
index a3e340cc4..acbedb00f 100644
--- a/internal/gitaly/service/repository/create_fork_test.go
+++ b/internal/gitaly/service/repository/create_fork_test.go
@@ -67,9 +67,7 @@ func TestCreateFork_successful(t *testing.T) {
ctx := testhelper.Context(t)
ctx = testhelper.MergeOutgoingMetadata(ctx, testcfg.GitalyServersMetadataFromCfg(t, cfg))
- repo, _ := gittest.CreateRepository(t, ctx, cfg, gittest.CreateRepositoryConfig{
- Seed: gittest.SeedGitLabTest,
- })
+ repo, _ := gittest.CreateRepository(t, ctx, cfg)
forkedRepo := &gitalypb.Repository{
RelativePath: gittest.NewRepositoryName(t),
@@ -246,11 +244,11 @@ func TestCreateFork_targetExists(t *testing.T) {
} {
t.Run(tc.desc, func(t *testing.T) {
ctx := testhelper.Context(t)
-
- cfg, repo, _, client := setupRepositoryService(t, ctx)
-
+ cfg, client := setupRepositoryServiceWithoutRepo(t)
ctx = testhelper.MergeOutgoingMetadata(ctx, testcfg.GitalyServersMetadataFromCfg(t, cfg))
+ repo, _ := gittest.CreateRepository(t, ctx, cfg)
+
forkedRepo := &gitalypb.Repository{
// As this test can run with Praefect in front of it, we'll use the next replica path Praefect will
// assign in order to ensure this repository creation conflicts even with Praefect in front of it.
@@ -273,8 +271,11 @@ func TestCreateFork_targetExists(t *testing.T) {
func TestCreateFork_validate(t *testing.T) {
t.Parallel()
+
ctx := testhelper.Context(t)
- _, repo, _, cli := setupRepositoryService(t, ctx)
+ cfg, cli := setupRepositoryServiceWithoutRepo(t)
+ repo, _ := gittest.CreateRepository(t, ctx, cfg)
+
for _, tc := range []struct {
desc string
req *gitalypb.CreateForkRequest