summaryrefslogtreecommitdiff
path: root/tests/online
Commit message (Collapse)AuthorAgeFilesLines
...
| * | MSVC does not support zero size arrayLinquize2014-08-311-2/+1
| |/
* | ssh: add test for host keyCarlos Martín Nieto2014-09-161-0/+32
| | | | | | | | | | Test that the certificate check callback gets the right fingerprint from the host we're connecting to.
* | winhttp: credential check on successful connectCarlos Martín Nieto2014-09-161-2/+4
| | | | | | | | On successful connection, still ask the user whether they accept the server's certificate, indicating that WinHTTP would let it though.
* | Bring certificate check back to the normal return codeCarlos Martín Nieto2014-09-161-2/+2
| | | | | | | | | | Returning 0 lets the certificate check succeed. An error code is bubbled up to the user.
* | ssh: do ssh cert info before asking for credentialsCarlos Martín Nieto2014-09-161-0/+3
| | | | | | | | | | We know the host's key as soon as we connect, so we should perform the check as soon as we can, before we bother with the user's credentials.
* | transport: always call the certificate check callbackCarlos Martín Nieto2014-09-161-5/+7
| | | | | | | | | | | | | | We should let the user decide whether to cancel the connection or not regardless of whether our checks have decided that the certificate is fine. We provide our own assessment to the callback to let the user fall back to our checks if they so desire.
* | remote: add tests for the certificate callbackCarlos Martín Nieto2014-09-161-0/+35
| |
* | Provide a callback for certificate validationCarlos Martín Nieto2014-09-161-1/+1
|/ | | | | | | | | If the certificate validation fails (or always in the case of ssh), let the user decide whether to allow the connection. The data structure passed to the user is the native certificate information from the underlying implementation, namely OpenSSL or WinHTTP.
* winhttp: Prevent swallowing of url parsing errornulltoken2014-08-271-0/+6
|
* Adjust clone tests to USERNAME cred typeCarlos Martín Nieto2014-08-271-0/+3
|
* Merge remote-tracking branch 'upstream/master' into cmn/ssh-retryCarlos Martín Nieto2014-08-273-56/+132
|\
| * Merge pull request #2528 from libgit2/vmg/tostr_sVicent Marti2014-08-181-4/+2
| |\ | | | | | | Export `git_oid_tostr_s` instead of `_allocfmt`
| | * oid: Export `git_oid_tostr_s` instead of `_allocfmt`vmg/tostr_sVicent Marti2014-08-181-4/+2
| | | | | | | | | | | | | | | | | | The old `allocfmt` is of no use to callers, as they are not able to free the returned buffer. Export a new API that returns a static string that doesn't need to be freed.
| * | online::clone::credentials support default credentialsEdward Thomson2014-08-151-3/+26
| | |
| * | Free references during push validationEdward Thomson2014-08-151-0/+2
| | |
| * | Remove the refs/notes/commits that we push in testEdward Thomson2014-08-141-0/+9
| | | | | | | | | | | | | | | | | | | | | The online::push::notes test pushes a note but leaves it hanging around for other tests to stumble across when they're validating that they're seeing the refs they expect to see. Clean it up on exit.
| * | Don't run the ssh clone tests against http remotesEdward Thomson2014-08-141-1/+1
| |/
| * ssh: provide a factory function for setting ssh pathscmn/ssh-factory-for-pathsCarlos Martín Nieto2014-07-071-0/+65
| | | | | | | | | | | | | | | | | | git allows you to set which paths to use for the git server programs when connecting over ssh; and we want to provide something similar. We do this by providing a factory function which can be set as the remote's transport callback which will set the given paths upon creation.
| * clone: remote git_clone_into{,_local} from the public APIcmn/clone-custom-repoCarlos Martín Nieto2014-07-021-40/+22
| | | | | | | | | | | | As git_clone now has callbacks to configure the details of the repository and remote, remove the lower-level functions from the public API, as they lack some of the logic from git_clone proper.
| * test: remove assembla clone testcmn/clone-auth-changeCarlos Martín Nieto2014-06-131-6/+0
| | | | | | | | | | | | | | The assembla failure we were seeing referred to a private repository, which is not what is there at the moment. This reverts 1fd21b0342f
| * test: use read-only accountCarlos Martín Nieto2014-06-131-3/+3
| | | | | | | | | | | | Don't write in plaintext the password of an account which has full control over the repository. Instead use an account with read-only access.
* | ssh: adjust clone and push test credentials to the split user+pass methodCarlos Martín Nieto2014-06-262-1/+38
| | | | | | | | | | | | | | For urls where we do not specify a username, we must handle the case where the ssh transport asks us for the username. Test also that switching username fails.
* | ssh: make sure to ask for a username and use the same oneCarlos Martín Nieto2014-06-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to know which authentication methods are supported/allowed by the ssh server, we need to send a NONE auth request, which needs a username associated with it. Most ssh server implementations do not allow switching the username between authentication attempts, which means we cannot use a dummy username and then switch. There are two ways around this. The first is to use a different connection, which an earlier commit implements, but this increases how long it takes to get set up, and without knowing the right username, we cannot guarantee that the list we get in response is the right one. The second is what's implemented here: if there is no username specified in the url, ask for it first. We can then ask for the list of auth methods and use the user's credentials in the same connection.
* | ssh: request credentials again on authentication failureCarlos Martín Nieto2014-06-261-0/+31
| | | | | | | | | | Instead of completely giving up on the first failure, ask for credentials as long as we fail to authenticate.
* | ssh: propagate the error code from the auth callbackCarlos Martín Nieto2014-06-171-2/+1
| | | | | | | | We need to be able to get a GIT_EUSER back through the outermost call.
* | ssh: detect authentication methodsCarlos Martín Nieto2014-06-171-0/+15
|/ | | | | | | | Before calling the credentials callback, ask the sever which authentication methods it supports and report that to the user, instead of simply reporting everything that the transport supports. In case of an error, we do fall back to listing all of them.
* Win32: Fix failing clone_mirror testPhilip Kelley2014-06-071-0/+3
|
* remote: expose the remote's symref mappingsCarlos Martín Nieto2014-05-211-0/+18
| | | | | Add a symref_target field to git_remote_head to expose the symref mappings to the user.
* clone: add failing test for a mirror-clone with clone_intoCarlos Martín Nieto2014-05-191-0/+33
| | | | | Show a failure to perform a mirror-clone from a repository, both local and remote.
* Verify update_tips callbacks in push test casesJacques Germishuys2014-04-211-35/+83
|
* Clar: skip testsvmg/clar-skip-testVicent Marti2014-04-022-40/+34
|
* git_checkout_opts -> git_checkout_optionsBen Straub2014-03-061-2/+2
|
* Added a test, that fails for #2133Matthias Bartelmeß2014-03-031-0/+15
|
* Only run clone-failure test on private repoBen Straub2014-02-051-1/+7
|
* Avoid crash when skipping remote testBen Straub2014-02-051-2/+4
|
* Fix broken clone testBen Straub2014-02-051-12/+4
|
* Add reflog parameters to remote apisBen Straub2014-02-043-4/+4
| | | Also added a test for git_remote_fetch.
* Add reflog parameters to git_push_update_tipsBen Straub2014-02-041-1/+15
|
* Augment clone API with reflog parametersBen Straub2014-01-301-1/+1
|
* refspec: move to git_buf for outputting stringsCarlos Martín Nieto2014-01-271-1/+1
|
* Updated fetch.c test to pass.Marek Šuppa2013-12-311-3/+3
| | | I am not sure why there was 6 in the first place.
* More tests of canceling from callbacksRussell Belfer2013-12-121-22/+41
| | | | | This covers diff print, push, and ref foreach. This also has a fix for a small memory leak in the push tests.
* Remove converting user error to GIT_EUSERRussell Belfer2013-12-112-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the behavior of callbacks so that the callback error code is not converted into GIT_EUSER and instead we propagate the return value through to the caller. Instead of using the giterr_capture and giterr_restore functions, we now rely on all functions to pass back the return value from a callback. To avoid having a return value with no error message, the user can call the public giterr_set_str or some such function to set an error message. There is a new helper 'giterr_set_callback' that functions can invoke after making a callback which ensures that some error message was set in case the callback did not set one. In places where the sign of the callback return value is meaningful (e.g. positive to skip, negative to abort), only the negative values are returned back to the caller, obviously, since the other values allow for continuing the loop. The hardest parts of this were in the checkout code where positive return values were overloaded as meaningful values for checkout. I fixed this by adding an output parameter to many of the internal checkout functions and removing the overload. This added some code, but it is probably a better implementation. There is some funkiness in the network code where user provided callbacks could be returning a positive or a negative value and we want to rely on that to cancel the loop. There are still a couple places where an user error might get turned into GIT_EUSER there, I think, though none exercised by the tests.
* Fix warningsRussell Belfer2013-11-181-0/+2
|
* Introduce git_cred_default for NTLM/SPNEGO authEdward Thomson2013-11-181-1/+15
|
* Propagate auth error codes as GIT_EUSER in winhttpEdward Thomson2013-11-181-0/+33
|
* Rename tests-clar to testsBen Straub2013-11-146-0/+1491