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
fe3b6789
Commit
fe3b6789
authored
Sep 01, 2014
by
Linquize
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skip SSH clone tests if libgit2 not built with GIT_SSH defined
parent
d99c8ca1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
tests/online/clone.c
+9
-0
No files found.
tests/online/clone.c
View file @
fe3b6789
...
@@ -384,6 +384,9 @@ void test_online_clone__ssh_auth_methods(void)
...
@@ -384,6 +384,9 @@ void test_online_clone__ssh_auth_methods(void)
{
{
int
with_user
;
int
with_user
;
#ifndef GIT_SSH
clar__skip
();
#endif
g_options
.
remote_callbacks
.
credentials
=
check_ssh_auth_methods
;
g_options
.
remote_callbacks
.
credentials
=
check_ssh_auth_methods
;
g_options
.
remote_callbacks
.
payload
=
&
with_user
;
g_options
.
remote_callbacks
.
payload
=
&
with_user
;
...
@@ -436,6 +439,9 @@ void test_online_clone__ssh_with_paths(void)
...
@@ -436,6 +439,9 @@ void test_online_clone__ssh_with_paths(void)
const
char
*
remote_url
=
cl_getenv
(
"GITTEST_REMOTE_URL"
);
const
char
*
remote_url
=
cl_getenv
(
"GITTEST_REMOTE_URL"
);
const
char
*
remote_user
=
cl_getenv
(
"GITTEST_REMOTE_USER"
);
const
char
*
remote_user
=
cl_getenv
(
"GITTEST_REMOTE_USER"
);
#ifndef GIT_SSH
clar__skip
();
#endif
if
(
!
remote_url
||
!
remote_user
||
strncmp
(
remote_url
,
"ssh://"
,
5
)
!=
0
)
if
(
!
remote_url
||
!
remote_user
||
strncmp
(
remote_url
,
"ssh://"
,
5
)
!=
0
)
clar__skip
();
clar__skip
();
...
@@ -459,6 +465,9 @@ static int cred_foo_bar(git_cred **cred, const char *url, const char *username_f
...
@@ -459,6 +465,9 @@ static int cred_foo_bar(git_cred **cred, const char *url, const char *username_f
void
test_online_clone__ssh_cannot_change_username
(
void
)
void
test_online_clone__ssh_cannot_change_username
(
void
)
{
{
#ifndef GIT_SSH
clar__skip
();
#endif
g_options
.
remote_callbacks
.
credentials
=
cred_foo_bar
;
g_options
.
remote_callbacks
.
credentials
=
cred_foo_bar
;
cl_git_fail
(
git_clone
(
&
g_repo
,
"ssh://git@github.com/libgit2/TestGitRepository"
,
"./foo"
,
&
g_options
));
cl_git_fail
(
git_clone
(
&
g_repo
,
"ssh://git@github.com/libgit2/TestGitRepository"
,
"./foo"
,
&
g_options
));
...
...
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