mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 16:51:55 +00:00
hack: Add support for iap:// URLs (#59709)
See inline comment for reasoning. ## Test plan Added a test.
This commit is contained in:
parent
e79319271a
commit
b98e9aeabf
@ -67,6 +67,12 @@ var schemes = map[string]struct{}{
|
||||
"rsync": {},
|
||||
"file": {},
|
||||
"perforce": {},
|
||||
// This is not an officially supported git protocol, and it will not work
|
||||
// without adding an override to the global git config for iap:// to https://.
|
||||
// This has been added as a response to a customer issue where their GitLab
|
||||
// instance reports a URL with the iap:// scheme.
|
||||
// https://github.com/sourcegraph/accounts/issues/2379
|
||||
"iap": {},
|
||||
}
|
||||
|
||||
func parseScheme(rawurl string) (*URL, error) {
|
||||
|
||||
@ -215,6 +215,12 @@ func TestParseURL(t *testing.T) {
|
||||
formatStdlib, "perforce", "admin:pa$$word", "ssl:192.168.1.100:1666", "//Sourcegraph/",
|
||||
"perforce://admin:pa$$word@ssl:192.168.1.100:1666//Sourcegraph/", "",
|
||||
),
|
||||
// iap://
|
||||
newParseURLTest(
|
||||
"iap://admin:pa$$word@gitlab.sgdev.org/test/repo.git",
|
||||
formatStdlib, "iap", "admin:pa$$word", "gitlab.sgdev.org", "/test/repo.git",
|
||||
"iap://admin:pa$$word@gitlab.sgdev.org/test/repo.git", "",
|
||||
),
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user