Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
9bdc0b00
Commit
9bdc0b00
authored
Mar 01, 2021
by
Ian Hattendorf
Committed by
Edward Thomson
Jun 30, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: test proxy https clone
parent
a0acf60e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
tests/online/clone.c
+22
-0
No files found.
tests/online/clone.c
View file @
9bdc0b00
...
@@ -869,6 +869,28 @@ void test_online_clone__proxy_credentials_in_environment(void)
...
@@ -869,6 +869,28 @@ void test_online_clone__proxy_credentials_in_environment(void)
git_buf_dispose
(
&
url
);
git_buf_dispose
(
&
url
);
}
}
void
test_online_clone__proxy_credentials_in_url_https
(
void
)
{
git_buf
url
=
GIT_BUF_INIT
;
if
(
!
_remote_proxy_host
||
!
_remote_proxy_user
||
!
_remote_proxy_pass
)
cl_skip
();
cl_git_pass
(
git_buf_printf
(
&
url
,
"%s://%s:%s@%s/"
,
_remote_proxy_scheme
?
_remote_proxy_scheme
:
"http"
,
_remote_proxy_user
,
_remote_proxy_pass
,
_remote_proxy_host
));
g_options
.
fetch_opts
.
proxy_opts
.
type
=
GIT_PROXY_SPECIFIED
;
g_options
.
fetch_opts
.
proxy_opts
.
url
=
url
.
ptr
;
g_options
.
fetch_opts
.
proxy_opts
.
certificate_check
=
proxy_cert_cb
;
g_options
.
fetch_opts
.
callbacks
.
certificate_check
=
ssl_cert
;
called_proxy_creds
=
0
;
cl_git_pass
(
git_clone
(
&
g_repo
,
"https://github.com/libgit2/TestGitRepository"
,
"./foo"
,
&
g_options
));
cl_assert
(
called_proxy_creds
==
0
);
git_buf_dispose
(
&
url
);
}
void
test_online_clone__proxy_auto_not_detected
(
void
)
void
test_online_clone__proxy_auto_not_detected
(
void
)
{
{
g_options
.
fetch_opts
.
proxy_opts
.
type
=
GIT_PROXY_AUTO
;
g_options
.
fetch_opts
.
proxy_opts
.
type
=
GIT_PROXY_AUTO
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment