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>2022-07-12 13:45:13 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2022-07-15 09:57:06 +0300
commita4a80a6ec53b44cc8408e0546dcfb122e1c33c27 (patch)
treec236a9e7213300ac6840a54c806d62f2cbae6a85
parent7edc0962187e2e8fe35bba2ca3ba02f893a00826 (diff)
objectpool: Improve test naming and parallelism
Improve test naming to match modern best practices and add missing calls to `t.Parallel()`.
-rw-r--r--internal/git/objectpool/fetch_test.go22
1 files changed, 17 insertions, 5 deletions
diff --git a/internal/git/objectpool/fetch_test.go b/internal/git/objectpool/fetch_test.go
index f45abce77..b962ff547 100644
--- a/internal/git/objectpool/fetch_test.go
+++ b/internal/git/objectpool/fetch_test.go
@@ -16,7 +16,9 @@ import (
"gitlab.com/gitlab-org/gitaly/v15/internal/testhelper"
)
-func TestFetchFromOriginDangling(t *testing.T) {
+func TestFetchFromOrigin_dangling(t *testing.T) {
+ t.Parallel()
+
ctx := testhelper.Context(t)
cfg, pool, repoProto := setupObjectPool(t, ctx)
@@ -86,7 +88,9 @@ func TestFetchFromOriginDangling(t *testing.T) {
require.NoFileExists(t, filepath.Join(pool.FullPath(), "objects", "info", "packs"))
}
-func TestFetchFromOriginFsck(t *testing.T) {
+func TestFetchFromOrigin_fsck(t *testing.T) {
+ t.Parallel()
+
ctx := testhelper.Context(t)
cfg, pool, repoProto := setupObjectPool(t, ctx)
@@ -110,7 +114,9 @@ func TestFetchFromOriginFsck(t *testing.T) {
require.Contains(t, err.Error(), "duplicateEntries: contains duplicate file entries")
}
-func TestFetchFromOriginDeltaIslands(t *testing.T) {
+func TestFetchFromOrigin_deltaIslands(t *testing.T) {
+ t.Parallel()
+
ctx := testhelper.Context(t)
cfg, pool, repoProto := setupObjectPool(t, ctx)
@@ -133,7 +139,9 @@ func TestFetchFromOriginDeltaIslands(t *testing.T) {
})
}
-func TestFetchFromOriginBitmapHashCache(t *testing.T) {
+func TestFetchFromOrigin_bitmapHashCache(t *testing.T) {
+ t.Parallel()
+
ctx := testhelper.Context(t)
cfg, pool, repoProto := setupObjectPool(t, ctx)
@@ -158,7 +166,9 @@ func TestFetchFromOriginBitmapHashCache(t *testing.T) {
gittest.TestBitmapHasHashcache(t, bitmap)
}
-func TestFetchFromOriginRefUpdates(t *testing.T) {
+func TestFetchFromOrigin_refUpdates(t *testing.T) {
+ t.Parallel()
+
ctx := testhelper.Context(t)
cfg, pool, repoProto := setupObjectPool(t, ctx)
@@ -204,6 +214,8 @@ func TestFetchFromOriginRefUpdates(t *testing.T) {
}
func TestFetchFromOrigin_refs(t *testing.T) {
+ t.Parallel()
+
ctx := testhelper.Context(t)
cfg, pool, _ := setupObjectPool(t, ctx)