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>2021-06-15 08:52:35 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2021-06-21 08:49:55 +0300
commit09624e64ea907f13759677bf9f712430f9de14c1 (patch)
tree3a8d71c0dc2e9d2509f366f635b36982a5e81e34
parent63269053b301be3641a240545163e2df81b601f5 (diff)
git: Refactor `IsSupported()` test to use subtests
While we use a table-driven test for `IsSupported()`, we do not use subtests. As a result, it's hard to see what's going wrong in case anything does. Convert the test to use subtests to fix this.
-rw-r--r--internal/git/version_test.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/internal/git/version_test.go b/internal/git/version_test.go
index e0c705d2f..123f366cd 100644
--- a/internal/git/version_test.go
+++ b/internal/git/version_test.go
@@ -123,8 +123,10 @@ func TestVersion_IsSupported(t *testing.T) {
{"2.31.1", true},
{"3.0.0", true},
} {
- version, err := parseVersion(tc.version)
- require.NoError(t, err)
- require.Equal(t, tc.expect, version.IsSupported())
+ t.Run(tc.version, func(t *testing.T) {
+ version, err := parseVersion(tc.version)
+ require.NoError(t, err)
+ require.Equal(t, tc.expect, version.IsSupported())
+ })
}
}