diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2022-08-09 11:18:32 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2022-08-11 16:07:33 +0300 |
commit | c680ac066efdc5484bd4ed7f0f5c66c6c149dd31 (patch) | |
tree | 4f43d55f1a78540b84f0275e9ef660839edb3afb | |
parent | 9c01aaeb7f4ab606c1ac875f95d4cb758ed0957b (diff) |
gitpipe: Parallelize tests
The gitpipe tests are not parallelized right now. Fix this by adding the
missing calls to `t.Parallel()`.
-rw-r--r-- | internal/git/gitpipe/catfile_info_test.go | 4 | ||||
-rw-r--r-- | internal/git/gitpipe/catfile_object_test.go | 2 | ||||
-rw-r--r-- | internal/git/gitpipe/diff_tree_test.go | 2 | ||||
-rw-r--r-- | internal/git/gitpipe/ls_tree_test.go | 2 | ||||
-rw-r--r-- | internal/git/gitpipe/pipeline_test.go | 4 | ||||
-rw-r--r-- | internal/git/gitpipe/revision_test.go | 6 |
6 files changed, 20 insertions, 0 deletions
diff --git a/internal/git/gitpipe/catfile_info_test.go b/internal/git/gitpipe/catfile_info_test.go index ecee41616..8872b3e11 100644 --- a/internal/git/gitpipe/catfile_info_test.go +++ b/internal/git/gitpipe/catfile_info_test.go @@ -19,6 +19,8 @@ import ( ) func TestCatfileInfo(t *testing.T) { + t.Parallel() + ctx := testhelper.Context(t) cfg := testcfg.Build(t) @@ -281,6 +283,8 @@ func TestCatfileInfo(t *testing.T) { } func TestCatfileInfoAllObjects(t *testing.T) { + t.Parallel() + cfg := testcfg.Build(t) ctx := testhelper.Context(t) diff --git a/internal/git/gitpipe/catfile_object_test.go b/internal/git/gitpipe/catfile_object_test.go index adc16678e..ebbeee874 100644 --- a/internal/git/gitpipe/catfile_object_test.go +++ b/internal/git/gitpipe/catfile_object_test.go @@ -20,6 +20,8 @@ import ( ) func TestCatfileObject(t *testing.T) { + t.Parallel() + ctx := testhelper.Context(t) cfg := testcfg.Build(t) diff --git a/internal/git/gitpipe/diff_tree_test.go b/internal/git/gitpipe/diff_tree_test.go index 556ec4e9f..5ea74263c 100644 --- a/internal/git/gitpipe/diff_tree_test.go +++ b/internal/git/gitpipe/diff_tree_test.go @@ -16,6 +16,8 @@ import ( ) func TestDiffTree(t *testing.T) { + t.Parallel() + ctx := testhelper.Context(t) cfg := testcfg.Build(t) diff --git a/internal/git/gitpipe/ls_tree_test.go b/internal/git/gitpipe/ls_tree_test.go index fd82e1921..87afb8390 100644 --- a/internal/git/gitpipe/ls_tree_test.go +++ b/internal/git/gitpipe/ls_tree_test.go @@ -15,6 +15,8 @@ import ( ) func TestLsTree(t *testing.T) { + t.Parallel() + ctx := testhelper.Context(t) cfg := testcfg.Build(t) diff --git a/internal/git/gitpipe/pipeline_test.go b/internal/git/gitpipe/pipeline_test.go index 33778946d..7271509c7 100644 --- a/internal/git/gitpipe/pipeline_test.go +++ b/internal/git/gitpipe/pipeline_test.go @@ -19,6 +19,8 @@ import ( ) func TestPipeline_revlist(t *testing.T) { + t.Parallel() + ctx := testhelper.Context(t) cfg := testcfg.Build(t) @@ -386,6 +388,8 @@ func TestPipeline_revlist(t *testing.T) { } func TestPipeline_forEachRef(t *testing.T) { + t.Parallel() + ctx := testhelper.Context(t) cfg := testcfg.Build(t) diff --git a/internal/git/gitpipe/revision_test.go b/internal/git/gitpipe/revision_test.go index 494bc54e7..5dfaffa15 100644 --- a/internal/git/gitpipe/revision_test.go +++ b/internal/git/gitpipe/revision_test.go @@ -19,6 +19,8 @@ import ( ) func TestRevlist(t *testing.T) { + t.Parallel() + ctx := testhelper.Context(t) cfg := testcfg.Build(t) @@ -526,6 +528,8 @@ func TestRevlist(t *testing.T) { } func TestForEachRef(t *testing.T) { + t.Parallel() + ctx := testhelper.Context(t) readRefs := func(t *testing.T, repo *localrepo.Repo, patterns []string, opts ...ForEachRefOption) []RevisionResult { @@ -658,6 +662,8 @@ func TestForEachRef(t *testing.T) { } func TestForEachRef_options(t *testing.T) { + t.Parallel() + ctx := testhelper.Context(t) for _, tc := range []struct { |