mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-21 17:55:30 +01:00
add match many version pattern test (#18092)
Signed-off-by: lengrongfu <1275177125@qq.com> Signed-off-by: lengrongfu <1275177125@qq.com>
This commit is contained in:
parent
2ea53444e6
commit
0fb076a09a
@ -73,6 +73,16 @@ func TestMatch(t *testing.T) {
|
||||
str: "1.01",
|
||||
match: false,
|
||||
},
|
||||
{
|
||||
pattern: "v2.[4-6].*", // match v2.4.*~v2.7.* version
|
||||
str: "v2.4.0",
|
||||
match: true,
|
||||
},
|
||||
{
|
||||
pattern: "v2.[4-7].*", // match v2.4.*~v2.7.* version
|
||||
str: "v2.7.0",
|
||||
match: true,
|
||||
},
|
||||
}
|
||||
for _, c := range cases {
|
||||
match, err := Match(c.pattern, c.str)
|
||||
|
Loading…
Reference in New Issue
Block a user