@@ -65,21 +65,34 @@ func TestGetPredefinedConfiguration(t *testing.T) {
6565 if res != Define .UBUNTU_BENCHMAKR_URL {
6666 t .Fatal ("Failed to get resource link" )
6767 }
68- if ! pattern .MatchString ("http://archive.ubuntu.com /ubuntu/InRelease" ) {
68+ if ! pattern .MatchString ("/ubuntu/InRelease" ) {
6969 t .Fatal ("Failed to verify domain name rules" )
7070 }
71- if ! pattern .MatchString ("http://ab.archive.ubuntu.com/ubuntu/InRelease" ) {
72- t .Fatal ("Failed to verify domain name rules" )
73- }
74- if pattern .MatchString ("http://abc.archive.ubuntu.com/ubuntu/InRelease" ) {
71+ if ! pattern .MatchString ("/ubuntu/InRelease" ) {
7572 t .Fatal ("Failed to verify domain name rules" )
7673 }
7774
7875 res , pattern = GetPredefinedConfiguration (Define .TYPE_LINUX_DISTROS_DEBIAN )
7976 if res != Define .DEBIAN_BENCHMAKR_URL {
8077 t .Fatal ("Failed to get resource link" )
8178 }
82- if ! pattern .MatchString ("http://deb.debian.org/debian/InRelease" ) {
79+ if ! pattern .MatchString ("/debian/InRelease" ) {
80+ t .Fatal ("Failed to verify domain name rules" )
81+ }
82+
83+ res , pattern = GetPredefinedConfiguration (Define .TYPE_LINUX_DISTROS_CENTOS )
84+ if res != Define .CENTOS_BENCHMAKR_URL {
85+ t .Fatal ("Failed to get resource link" )
86+ }
87+ if ! pattern .MatchString ("/centos/test/repomd.xml" ) {
88+ t .Fatal ("Failed to verify domain name rules" )
89+ }
90+
91+ res , pattern = GetPredefinedConfiguration (Define .TYPE_LINUX_DISTROS_ALPINE )
92+ if res != Define .ALPINE_BENCHMAKR_URL {
93+ t .Fatal ("Failed to get resource link" )
94+ }
95+ if ! pattern .MatchString ("/alpine/test/APKINDEX.tar.gz" ) {
8396 t .Fatal ("Failed to verify domain name rules" )
8497 }
8598}
0 commit comments