Skip to content

Commit dd4f826

Browse files
test: remove dupe test, improve test names (#28252)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
1 parent 022f935 commit dd4f826

1 file changed

Lines changed: 5 additions & 10 deletions

File tree

util/versions/tags_test.go

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -86,23 +86,23 @@ func TestTags_IsConstraint(t *testing.T) {
8686
t.Parallel()
8787
assert.False(t, IsConstraint("2024.03-LTS-RC19"))
8888
})
89-
t.Run("Constraint", func(t *testing.T) {
89+
t.Run("EqualConstraint", func(t *testing.T) {
9090
t.Parallel()
9191
assert.True(t, IsConstraint("= 0.5.3"))
9292
})
93-
t.Run("Constraint", func(t *testing.T) {
93+
t.Run("GreaterThanConstraint", func(t *testing.T) {
9494
t.Parallel()
9595
assert.True(t, IsConstraint("> 0.5.3"))
9696
})
97-
t.Run("Constraint", func(t *testing.T) {
97+
t.Run("RangeConstraint", func(t *testing.T) {
9898
t.Parallel()
9999
assert.True(t, IsConstraint(">0.5.0,<0.7.0"))
100100
})
101-
t.Run("Constraint", func(t *testing.T) {
101+
t.Run("WildcardPatchConstraint", func(t *testing.T) {
102102
t.Parallel()
103103
assert.True(t, IsConstraint("0.7.*"))
104104
})
105-
t.Run("Constraint", func(t *testing.T) {
105+
t.Run("WildcardAllConstraint", func(t *testing.T) {
106106
t.Parallel()
107107
assert.True(t, IsConstraint("*"))
108108
})
@@ -249,9 +249,4 @@ func TestMaxVersion_WithTagPrefix(t *testing.T) {
249249
require.NoError(t, err)
250250
assert.Equal(t, "foo/bar/v1.0.1", version)
251251
})
252-
253-
t.Run("non-semver non-constraint with prefix returns error", func(t *testing.T) {
254-
_, err := MaxVersion("main", []string{"prod/v1.0.0"}, "prod/")
255-
require.Error(t, err)
256-
})
257252
}

0 commit comments

Comments
 (0)