(t *testing.T)
| 104 | } |
| 105 | |
| 106 | func TestIsRCVersion(t *testing.T) { |
| 107 | t.Parallel() |
| 108 | |
| 109 | cases := []struct { |
| 110 | name string |
| 111 | version string |
| 112 | expected bool |
| 113 | }{ |
| 114 | {"RC0", "v2.31.0-rc.0", true}, |
| 115 | {"RC1WithBuild", "v2.31.0-rc.1+abc123", true}, |
| 116 | {"RC10", "v2.31.0-rc.10", true}, |
| 117 | {"RCDevel", "v2.33.0-rc.1-devel+727ec00f7", true}, |
| 118 | {"DevelVersion", "v2.31.0-devel+abc123", false}, |
| 119 | {"StableVersion", "v2.31.0", false}, |
| 120 | {"DevNoVersion", "v0.0.0-devel+abc123", false}, |
| 121 | {"BetaVersion", "v2.31.0-beta.1", false}, |
| 122 | } |
| 123 | |
| 124 | for _, c := range cases { |
| 125 | t.Run(c.name, func(t *testing.T) { |
| 126 | t.Parallel() |
| 127 | require.Equal(t, c.expected, buildinfo.IsRCVersion(c.version)) |
| 128 | }) |
| 129 | } |
| 130 | } |
nothing calls this directly
no test coverage detected