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 66)
77
88var (
9- reg = regexp .MustCompile (`^ .*\.azurecr.io$ ` )
9+ reg = regexp .MustCompile (`.*\.azurecr\ .io|.*\.azurecr\.cn|.*\.azurecr\.de|.*\.azurecr\.us ` )
1010)
1111
1212func (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) {
2727 host : "versionchecker.azurecr.io" ,
2828 expIs : true ,
2929 },
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+ },
3042 "foodazurecr.io should be false" : {
3143 host : "fooazurecr.io" ,
3244 expIs : false ,
You can’t perform that action at this time.
0 commit comments