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
fe45922d
Commit
fe45922d
authored
Feb 05, 2014
by
Ben Straub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix broken clone test
parent
a2ce19ca
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
12 deletions
+4
-12
tests/online/clone.c
+4
-12
No files found.
tests/online/clone.c
View file @
fe45922d
...
...
@@ -192,30 +192,22 @@ static int cred_failure_cb(
{
GIT_UNUSED
(
cred
);
GIT_UNUSED
(
url
);
GIT_UNUSED
(
username_from_url
);
GIT_UNUSED
(
allowed_types
);
GIT_UNUSED
(
data
);
return
-
1
;
return
-
1
72
;
}
void
test_online_clone__cred_callback_failure_
is_euser
(
void
)
void
test_online_clone__cred_callback_failure_
return_code_is_tunnelled
(
void
)
{
const
char
*
remote_url
=
cl_getenv
(
"GITTEST_REMOTE_URL"
);
const
char
*
remote_user
=
cl_getenv
(
"GITTEST_REMOTE_USER"
);
const
char
*
remote_default
=
cl_getenv
(
"GITTEST_REMOTE_DEFAULT"
);
int
error
;
if
(
!
remote_url
)
{
printf
(
"GITTEST_REMOTE_URL unset; skipping clone test
\n
"
);
return
;
}
if
(
!
remote_user
&&
!
remote_default
)
{
printf
(
"GITTEST_REMOTE_USER and GITTEST_REMOTE_DEFAULT unset; skipping clone test
\n
"
);
return
;
}
g_options
.
remote_callbacks
.
credentials
=
cred_failure_cb
;
cl_git_fail
(
error
=
git_clone
(
&
g_repo
,
remote_url
,
"./foo"
,
&
g_options
));
cl_
assert_equal_i
(
error
,
GIT_EUSER
);
/* TODO: this doesn't work currently. */
cl_
git_fail_with
(
git_clone
(
&
g_repo
,
remote_url
,
"./foo"
,
&
g_options
),
-
1
);
}
void
test_online_clone__credentials
(
void
)
...
...
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