File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 6
6
)
7
7
8
8
var (
9
- reg = regexp .MustCompile (`^ .*\.azurecr.io$ ` )
9
+ reg = regexp .MustCompile (`.*\.azurecr\ .io|.*\.azurecr\.cn|.*\.azurecr\.de|.*\.azurecr\.us ` )
10
10
)
11
11
12
12
func (c * Client ) IsHost (host string ) bool {
Original file line number Diff line number Diff line change @@ -27,6 +27,18 @@ func TestIsHost(t *testing.T) {
27
27
host : "versionchecker.azurecr.io" ,
28
28
expIs : true ,
29
29
},
30
+ "azurecr.cn with random sub domains should be true" : {
31
+ host : "versionchecker.azurecr.cn" ,
32
+ expIs : true ,
33
+ },
34
+ "azurecr.de with random sub domains should be true" : {
35
+ host : "versionchecker.azurecr.de" ,
36
+ expIs : true ,
37
+ },
38
+ "azurecr.us with random sub domains should be true" : {
39
+ host : "versionchecker.azurecr.us" ,
40
+ expIs : true ,
41
+ },
30
42
"foodazurecr.io should be false" : {
31
43
host : "fooazurecr.io" ,
32
44
expIs : false ,
You can’t perform that action at this time.
0 commit comments