summaryrefslogtreecommitdiff
path: root/spec
Commit message (Collapse)AuthorAgeFilesLines
* Remove repo_path from GitlabShellzj-remove-repo-pathZeger-Jan van de Weg2018-08-162-30/+5
| | | | | | | | | | | | | | | The internal api returns '/' from gitlab, since `8fad07383ada021fc995294fd0fe0f77fe37da35` from GitLab CE. To clean up later, https://gitlab.com/gitlab-org/gitlab-shell/issues/135 was created. This change closes that issue, making it possible to remove the field from the response on GitLab-CE too. Given the Rails app always returns `/` as the repository_path, the associated checks are basically a noop too. The tests are updated and at times look a little fishy, but those are testing code that is to be removed in another MR. Closes https://gitlab.com/gitlab-org/gitlab-shell/issues/135
* Disable WEBrick logging in HTTPUNIXServer to reduce spec output noisers-rspecRobert Speicher2018-08-151-0/+6
|
* Update webmock to 3.4.2Robert Speicher2018-08-152-2/+3
|
* Reorganize spec_helper; add support files for VCR and HTTPUNIXServerRobert Speicher2018-08-153-35/+40
|
* Use `output` matcher in one testRobert Speicher2018-08-151-4/+1
|
* Require gitlab_init from spec_helperRobert Speicher2018-08-151-0/+2
| | | | This defines `ROOT_PATH`, which we later stub.
* Override `ROOT_PATH` in specs in a less insane wayRobert Speicher2018-08-151-2/+6
|
* Remove usages of `its` in specsRobert Speicher2018-08-153-16/+27
|
* Update rspec to 3.8.0; remove rspec-itsRobert Speicher2018-08-151-2/+0
|
* Autocorrect specs via `transpec -k its -v stub_with_hash`Robert Speicher2018-08-1510-195/+195
|
* Merge remote-tracking branch 'upstream/8-1-stable' into ↵Nick Thomas2018-08-142-0/+166
|\ | | | | | | 148-merge-8-1-1-to-master
| * Harden gitlab-shell against arguments following the gl_id parameter in the ↵Nick Thomas2018-08-091-3/+3
| | | | | | | | command line
| * Fix two regressions in SSH certificate supportÆvar Arnfjörð Bjarmason2018-08-082-0/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix two regressions in my 2e8b670 ("Add support for SSH certificate authentication", 2018-06-14) merged in gitlab-org/gitlab-shell!207. This fixes the issue noted in gitlab-org/gitlab-shell#145 where the command-line contains things other than the key/user/username, and also a regression where SSH certificates are being used, and the username presented in the key is unknown to GitLab. In that case, we should log the user in as "Anonymous" (on an instance that allows public access), but because of how the error checking around api.discover() was implemented we ended up erroring out instead.
* | Restore "Pass custom git_config_options to Gitalyo"Nick Thomas2018-08-142-0/+9
| | | | | | | | This reverts commit 764f6f47fa6a8698ae033532ae49875a87030518.
* | Revert "Merge branch 'ash.mckenzie/srp-refactor' into 'master'"Nick Thomas2018-08-1437-1439/+698
| | | | | | | | | | This reverts commit 3aaf4751e09262c53544a1987f59b1308af9b6c1, reversing changes made to c6577e0d75f51b017f2f332838b97c3ca5b497c0.
* | Revert "Pass custom git_config_options to Gitalyo"Nick Thomas2018-08-143-6/+1
| | | | | | | | This reverts commit f4ce4a3c31a9a7fb2fa0bb7daa185d34b8c03c00.
* | Pass custom git_config_options to GitalyoRubén Dávila2018-08-073-1/+6
| | | | | | | | | | The /api/internal/allowed endpoint on GitLab has been updated to return some custom git options that can be used with git commands, we need to pass these received options to Gitaly.
* | Merge remote-tracking branch 'origin/master' into ash.mckenzie/srp-refactorAsh McKenzie2018-08-025-8/+19
|\ \ | |/
| * use GIT_PROTOCOL env variable in gitlab_shell#execJames Lopez2018-08-011-1/+5
| |
| * update gitlab shell to remove git_protocol env varJames Lopez2018-08-011-1/+0
| |
| * Add Git protocol v2James Lopez2018-08-012-34/+47
| |
* | GitlatNet#discover only parse JSON if a 200Ash McKenzie2018-08-012-1/+53
| |
* | Update Actor::Username, add specsAsh McKenzie2018-08-012-0/+85
| |
* | Merge remote-tracking branch 'origin/master' into ash.mckenzie/srp-refactorAsh McKenzie2018-08-016-61/+87
|\ \ | |/
| * Add support for SSH certificate authenticationÆvar Arnfjörð Bjarmason2018-07-263-19/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This along with the code submitted to gitlab-ce in the gitlab-org/gitlab-ce! MR implements SSH certificate authentication. See the docs added to gitlab-ce for why and how to enable this. This, along with that MR, closes gitlab-org/gitlab-ce#3457 Implementation notes: - Because it's easy to do, and because an earlier nascent version of this would pass user-ID to gitlab-shell, that's now supported, even though the SSH certificate authentication uses username-USERNAME. - The astute reader will notice that not all the API calls in gitlab-ce's lib/api/internal.rb support a "username" argument, some only support "user_id". There's a few reasons for this: a) For this to be efficient, I am bending over backwards to avoid extra API calls when using SSH certificates. Therefore the /allowed API call will now return a "user id" to us if we're allowed to proceed further. This is then fed to existing APIs that would only be called after a successful call to /allowed. b) Not all of the git-shell codepaths go through /internal/allowed, or ever deal with a repository, e.g. the argument-less "Welcome to GitLab", and /internal/2fa_recovery_codes. These need to use /internal/discover to figure out details about the user, so support looking that up by username. c) Once we have the "user id", the GL_ID gets passed down to e.g. user-authored hooks. I don't want to have those all break by having to handle a third GL_ID mode of "username" in addition to the current "key id" and "user id".
* | Remove User as Actor::Key/User has replaced itAsh McKenzie2018-08-011-52/+0
| |
* | Use actor when we don't know if it's a Key or UserAsh McKenzie2018-08-016-51/+62
| | | | | | | | | | | | * Use gl_id when we don't know if it's a key-X or user-X * Use Actor.new_from(gl_id) which will figure out if it's a Key or User * Use key_str when we're referring to key-X as key_id is confusing
* | New Actor::Base, Actor::Key and Actor::UserAsh McKenzie2018-08-014-0/+198
| |
* | Rename NotFound -> NotFoundErrorAsh McKenzie2018-08-011-4/+4
| |
* | Updated GitlabConfig spec to be less brittleAsh McKenzie2018-08-011-5/+31
| |
* | Utilise new ActionsAsh McKenzie2018-08-0119-531/+651
| | | | | | | | | | | | | | | | | | | | * Move gitaly, git-lfs and 2FA logic out from gitlab_shell.rb * Streamline parsing of origin_cmd in GitlabShell * Utilise proper HTTP status codes sent from the API * Also support 200 OK with status of true/false (ideally get rid of this) * Use HTTP status constants * Use attr_reader definitions (var over @var) * Rspec deprecation fixes
* | Fix cassettes that were wrongAsh McKenzie2018-08-012-2/+2
| |
* | Fix some rspec deprecationsAsh McKenzie2018-08-017-129/+126
| |
* | New Action classesAsh McKenzie2018-08-014-0/+265
| | | | | | | | | | | | | | * Base - contains all common logic * Gitaly - performs interactions with Gitaly * API2FARecovery - 2FA recovery code generation * GitLFSAuthenticate - git-lfs authentication
* | New User classAsh McKenzie2018-07-301-0/+52
|/
* Rspec upgrade and deprecation fixesash.mckenzie/minor-tidy-upAsh McKenzie2018-07-206-39/+50
|
* Support HTTP headers and sending JSONAsh McKenzie2018-07-201-13/+62
|
* Rename HTTPHelper#host to #internal_api_endpointAsh McKenzie2018-07-201-8/+8
|
* Add #base_api_endpoint for re-usabilityAsh McKenzie2018-07-201-0/+8
|
* allow long strings to remain intact while parsing broadcast messageCameron Crockett2018-06-011-0/+119
| | | | | | | | | | | | | | Added fix for msg nil edge case. fixed comment wording code review issues, bumped version and changelog entry Fixed rebase issues Moved strip out of the function Fixes for code review comments Removed trailing whitespaces
* Bump version to 7.1.3bvl-display-username-instead-of-fullnameBob Van Landuyt2018-05-241-1/+1
|
* Display the username instead of fullnameBob Van Landuyt2018-05-231-5/+5
| | | | | | | | When running `ssh git@gitlab.example.com` we used to reply with the full name. But it might actually be more useful to display the username. This is unique and can help support identifying issues. Closes #131
* Add missing GitlabLogger#error methodJacob Vosmaer (GitLab)2018-04-091-0/+18
|
* Flush log file after every writeJacob Vosmaer (GitLab)2018-03-231-0/+12
|
* Add Gitaly git-upload-archive migrated commandgitaly-upload-archiveAlejandro Rodríguez2018-03-201-0/+55
|
* Switch to structured loggingJacob Vosmaer (GitLab)2018-03-195-32/+156
|
* Fix tests that fail locallyJacob Vosmaer (GitLab)2018-03-132-12/+22
|
* Adds changelog item and bumps the versionTiago Botelho2018-02-061-45/+4
|
* Print new project information in post receiveTiago Botelho2018-02-061-5/+53
|
* Replace coveralls with simplecovdz-remove-coverallsDmitriy Zaporozhets2018-02-051-7/+2
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>