summaryrefslogtreecommitdiff
path: root/tests/online
Commit message (Collapse)AuthorAgeFilesLines
* Fix build for unit testLeo Yang2015-11-021-2/+13
| | | | | If none of GIT_OPENSSL, GIT_WINHTTP or GIT_SECURE_TRANSPORT is defined we should also be able to build the unit test.
* Merge pull request #3411 from spraints/custom-push-headersCarlos Martín Nieto2015-09-303-7/+34
|\ | | | | Include custom HTTP headers
| * Add a test for custom header validationMatt Burke2015-09-101-0/+27
| | | | | | | | Also, *some* custom headers actually are valid.
| * Tell the git_transport about the custom_headersMatt Burke2015-09-082-7/+7
| |
* | net: add tests against badssl.comcmn/badsslCarlos Martín Nieto2015-09-271-0/+27
| | | | | | | | | | These provide bad X.509 certificates, which we should refuse to connect to by default.
* | Fix a couple of warningsCarlos Martín Nieto2015-09-181-1/+0
| |
* | push: put the git_oid inline in the test structurecmn/push-tests-inline-oidCarlos Martín Nieto2015-09-133-11/+6
|/ | | | | | These are small pieces of data, so there is no advantage to allocating them separately. Include the two ids inline in the struct we use to check that the expected and actual ids match.
* git__getenv: utf-8 aware env readerEdward Thomson2015-07-022-57/+69
| | | | | | Introduce `git__getenv` which is a UTF-8 aware `getenv` everywhere. Make `cl_getenv` use this to keep consistent memory handling around return values (free everywhere, as opposed to only some platforms).
* clone: set the credentials callback during testingcmn/push-testsCarlos Martín Nieto2015-06-121-0/+1
|
* push: pass the callbacks during setup as wellCarlos Martín Nieto2015-06-121-3/+7
| | | | | We need to pass these options in order to have the credentials callback set.
* Merge pull request #3157 from mgorny/ssh_memory_authCarlos Martín Nieto2015-05-291-0/+68
|\ | | | | Support getting SSH keys from memory, pt. 2
| * test: Add a test for in-memory SSH private key cred_cbMichał Górny2015-05-271-0/+68
| |
* | clone: don't rely on auto-saving for single-branchCarlos Martín Nieto2015-05-171-10/+13
|/ | | | | | | | | | | | The code used to rely on the clone code calling the remote's save, which does not happen anymore, meaning that the configuration settings the remote expected were not being written to disk. The run-time configuration was still being affected, so the right branch was being cloned. The tests continued to pass as we did not check for the configuration entires. Fix this by creating the remote with the single-branch refspec we want and checking for its existence in the configuration.
* remote: remove live changing of refspecsCarlos Martín Nieto2015-05-132-9/+6
| | | | | | | | | | | | The base refspecs changing can be a cause of confusion as to what is the current base refspec set and complicate saving the remote's configuration. Change `git_remote_add_{fetch,push}()` to update the configuration instead of an instance. This finally makes `git_remote_save()` a no-op, it will be removed in a later commit.
* remote: move the tagopt setting to the fetch optionsCarlos Martín Nieto2015-05-132-4/+5
| | | | | This is another option which we should not be keeping in the remote, but is specific to each particular operation.
* remote: move the update_fetchhead setting to the optionsCarlos Martín Nieto2015-05-131-1/+1
| | | | | | While this will rarely be different from the default, having it in the remote adds yet another setting it has to keep around and can affect its behaviour. Move it to the options.
* remote: move the transport ctor to the callbacksCarlos Martín Nieto2015-05-132-5/+5
| | | | | | | Instead of having it set in a different place from every other callback, put it the main structure. This removes some state from the remote and makes it behave more like clone, where the constructors are passed via the options.
* Remove the callbacks struct from the remoteCarlos Martín Nieto2015-05-134-85/+59
| | | | | | | | | | | | | | Having the setting be different from calling its actions was not a great idea and made for the sake of the wrong convenience. Instead of that, accept either fetch options, push options or the callbacks when dealing with the remote. The fetch options are currently only the callbacks, but more options will be moved from setters and getters on the remote to the options. This does mean passing the same struct along the different functions but the typical use-case will only call git_remote_fetch() or git_remote_push() and so won't notice much difference.
* Merge pull request #3059 from libgit2/cmn/negotiation-notifyEdward Thomson2015-05-011-1/+1
|\ | | | | [WIP/RFC] push: report the update plan to the caller
| * push: report the update plan to the callercmn/negotiation-notifyCarlos Martín Nieto2015-04-191-1/+1
| | | | | | | | | | | | | | | | | | It can be useful for the caller to know which update commands will be sent to the server before the packfile is pushed up. git does this via the pre-push hook. We don't have hooks, but as it adds introspection into what is happening, we can add a callback which performs the same function.
* | Fix for Issue #3023 tests fail with no networkcthomas2015-04-211-0/+52
|/ | | | | | | Moved offending tests from network to online so they will get skipped when there is a lack of network connectivity: -test_online_remotes__single_branch -test_online_remotes__restricted_refspecs
* Add failing test for cert callback with non-ecrypted streamCarlos Martín Nieto2015-03-161-0/+7
| | | | | | When we have an HTTP stream and have set the certificatre check callback, we currently fail as we ask the unencrypted stream for its certificate.
* Put back the number of expected references to 6 from the test repoCarlos Martín Nieto2015-03-131-3/+3
| | | | | | | This was but down to 5 when GitHub made a change to their server which made them stop honouring the include-tag request. This has recently been corrected, so we can bring it back up to six.
* push: remove reflog message overrideCarlos Martín Nieto2015-03-031-2/+2
| | | | We always use "update by push".
* Remove the signature from ref-modifying functionsCarlos Martín Nieto2015-03-033-11/+8
| | | | | | | | | | The signature for the reflog is not something which changes dynamically. Almost all uses will be NULL, since we want for the repository's default identity to be used, making it noise. In order to allow for changing the identity, we instead provide git_repository_set_ident() and git_repository_ident() which allow a user to override the choice of signature.
* clone: drop now unnecessary SAFE_CREATEEdward Thomson2015-02-271-1/+1
|
* remote: remove git_push from the public APIcmn/hide-pushCarlos Martín Nieto2014-12-301-28/+16
| | | | | Instead we provide git_remote_upload() and git_remote_update_tips() in order to have a parallel API for fetching and pushing.
* notes: move the notes name argumentCarlos Martín Nieto2014-12-061-2/+2
| | | | | Make it consistent between git_note_create() and git_note_remote() by putting it after the repository.
* fetch: clear the connection data on closecmn/fetch-twiceCarlos Martín Nieto2014-11-191-0/+11
| | | | | | | | | | | When we fetch twice with the same remote object, we did not properly clear the connection flags, so we would leak state from the last connection. This can cause the second fetch with the same remote object to fail if using a HTTP URL where the server redirects to HTTPS, as the second fetch would see `use_ssl` set and think the initial connection wanted to downgrade the connection.
* Merge pull request #2608 from libgit2/cmn/remote-pushEdward Thomson2014-11-183-59/+114
|\ | | | | Provide a convenience function `git_remote_push()`
| * remote: use configured push refspecs if none are givencmn/remote-pushCarlos Martín Nieto2014-11-091-4/+38
| | | | | | | | | | If the user does not pass any refspecs to push, try to use those configured via the configuration or via add_push().
| * push: move main test function to git_remote_push()Carlos Martín Nieto2014-11-093-59/+80
| | | | | | | | | | | | | | We have the step-by-step method in the initialization function as we want to remove references based on the list of references which are already there, and we can use the convenience function for testing the main push.
| * remote: introduce git_remote_push()Carlos Martín Nieto2014-11-091-1/+1
| | | | | | | | | | | | | | | | | | This function, similar in style to git_remote_fetch(), performs all the steps required for a push, with a similar interface. The remote callbacks struct has learnt about the push callbacks, letting us set the callbacks a single time instead of setting some in the remote and some in the push operation.
* | Merge pull request #2693 from libgit2/cmn/push-refspec-refactorEdward Thomson2014-11-171-10/+7
|\ \ | |/ |/| push: use the common refspec parser
| * push: use the common refspec parsercmn/push-refspec-refactorCarlos Martín Nieto2014-11-091-10/+7
| | | | | | | | | | | | | | | | | | | | | | There is one well-known and well-tested parser which we should use, instead of implementing parsing a second time. The common parser is also augmented to copy the LHS into the RHS if the latter is empty. The expressions test had to change a bit, as we now catch a bad RHS of a refspec locally.
* | remote: rename _load() to _lookup()cmn/remote-lookupCarlos Martín Nieto2014-11-083-4/+4
|/ | | | This brings it in line with the rest of the lookup functions.
* Merge pull request #2574 from csware/hostname-for-certificate_check_cbEdward Thomson2014-10-101-3/+8
|\ | | | | Provide host name to certificate_check_cb
| * Add tests for host namesSven Strickroth2014-10-091-2/+4
| | | | | | | | Signed-off-by: Sven Strickroth <email@cs-ware.de>
| * Provide host name to certificate_check_cbSven Strickroth2014-09-221-3/+6
| | | | | | | | Signed-off-by: Sven Strickroth <email@cs-ware.de>
* | remote: use active refspec override in the testsCarlos Martín Nieto2014-09-301-3/+5
| | | | | | | | | | This lets us test this bit as well as getting closer to what they were trying to do.
* | remote: allow overriding the refspecs for download and fetchCarlos Martín Nieto2014-09-303-7/+7
|/ | | | | | | With opportunistic ref updates, git has introduced the concept of having base refspecs *and* refspecs that are active for a particular fetch. Let's start by letting the user override the refspecs for download.
* ssh: skip the localhost cert check earliercmn/host-cert-infoCarlos Martín Nieto2014-09-161-2/+4
| | | | | Skip it before we attempt to clone, as we would exit with -1 on systems which do not have sshd running.
* ssh: expose both hashesCarlos Martín Nieto2014-09-161-4/+13
| | | | | The user may have the data hashed as MD5 or SHA-1, so we should provide both types for consumption.
* ssh: provide our own types for host key lengthsCarlos Martín Nieto2014-09-161-0/+2
| | | | | Instead of using the libssh2 defines, provide our own, which eases usage as we do not need to check whether libgit2 was built with libssh2 or not.
* net: use only structs to pass information about certCarlos Martín Nieto2014-09-161-13/+8
| | | | | | Instead of spreading the data in function arguments, some of which aren't used for ssh and having a struct only for ssh, use a struct for both, using a common parent to pass to the callback.
* Merge remote-tracking branch 'upstream/master' into cmn/host-cert-infoCarlos Martín Nieto2014-09-163-2/+22
|\
| * Merge pull request #2554 from linquize/fetch-head-tagVicent Marti2014-09-151-0/+12
| |\ | | | | | | When auto follow tags, FETCH_HEAD should list only newly followed tags
| | * When auto follow tags, FETCH_HEAD should list only newly followed tagsLinquize2014-09-061-0/+12
| | |
| * | Merge pull request #2545 from linquize/no-sshVicent Marti2014-09-031-0/+9
| |\ \ | | | | | | | | Skip SSH clone tests if libgit2 not built with GIT_SSH defined
| | * | Skip SSH clone tests if libgit2 not built with GIT_SSH definedLinquize2014-09-011-0/+9
| | |/