config: add url scheme-match test

This commit is contained in:
Preben Ingvaldsen 2018-11-26 16:04:21 -08:00
parent 1f39eec602
commit da15a760f2

@ -17,6 +17,7 @@ func TestURLConfig(t *testing.T) {
"http.https://host.com/repo.git.key": []string{".git"},
"http.https://host.com/repo.key": []string{"no .git"},
"http.https://host.com/repo2.key": []string{"no .git"},
"http.http://host.com/repo.key": []string{"http"},
})))
getOne := map[string]string{
@ -35,6 +36,7 @@ func TestURLConfig(t *testing.T) {
"https://host.com/repo2.git/info": "host-2", // doesn't match /.git/info/lfs\Z/
"https://host.com/repo2.git": "host-2", // ditto
"https://host.com/repo2": "no .git",
"http://host.com/repo": "http",
}
for rawurl, expected := range getOne {